E-mail List Archives
Re: Can aria-labelledby refer to a label?
From: Jared Smith
Date: Jul 2, 2013 2:50PM
- Next message: Ryan E. Benson: "Re: blog content order"
- Previous message: Patrick H. Lauke: "Re: Can aria-labelledby refer to a label?"
- Next message in Thread: None
- Previous message in Thread: Patrick H. Lauke: "Re: Can aria-labelledby refer to a label?"
- View all messages in this Thread
This should work just fine. The only 'gotcha' you need to be aware of
is when an element has an associated label element AND an
aria-labelledby attribute. In this case, the ARIA label will be read
and the associated label ignored.
This is usually the case when you have native HTML roles or
accessibility values and ARIA roles/values - ARIA will always override
the native semantics and accessibility. I've seen cases where someone
used a native <label> element for a primary label and also
aria-labelledby (or aria-label) to reference a secondary label or
instructions. This just results in the primary label being overridden
by the secondary label. The solution - keep the <label> as a fall-back
for older technologies, but have aria-labelledby reference both the
primary and secondary labels (or better, use aria-describedby for the
secondary label).
Jared
- Next message: Ryan E. Benson: "Re: blog content order"
- Previous message: Patrick H. Lauke: "Re: Can aria-labelledby refer to a label?"
- Next message in Thread: None
- Previous message in Thread: Patrick H. Lauke: "Re: Can aria-labelledby refer to a label?"
- View all messages in this Thread