-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider allowing aria-label
on role="time"
#2320
Comments
@scottaohara commented
|
thank you @zcorpan some additional context for my comment is that some people may want the "1h" text to be announced to them as "1 hour ago", while some others are perfectly fine with the "1h" as visually rendered. the way the abbr element and the title attribute work with JAWS, for example, is that title doesn't just overwrite the text of the abbr as its name. But JAWS provides a setting so that someone can make the choice to hear the abbr as either what's presented visually, or replaced with the content of the title attribute. Being a user choice, this can then also mitigate any awkwardness for someone who might need to copy/paste a selection of text that includes an abbr (or in this case, a time element) - and upon pasting they find that the text that they heard is not matching what they pasted. in summary, i like this idea of this proposal - i just am not sure aria-label is the way to go here. We have also talked about how there's a need for an 'alternate label' or 'terse label' in relation to other scenarios, like mitigating overly long captions, legends and column/row headers. This might be worth considering in those buckets as well, since there's no good way to even replicate what |
If an author chooses to expose machine-friendly language to sighted users, they should do the same for screen reader users. Prohibiting naming of the element ensures that the actual content of the element is accessible to everyone. It is a design decision to show "1H ago" instead of "1 Hour Ago" to users. Per discussion in August 29, 2024 ARIA working group telecon, closing this as won't fix. |
The text content of an element with
role="time"
(when not thetime
element with adatetime
attribute) is a machine-readable time, which is often not what you want to present to humans. For example, in https://shkspr.mobi/blog/2020/12/making-time-more-accessible/ there's a desire to have "1 hour ago" as the text exposed to accessibility APIs (and "1h" for visual rendering). Prohibiting name forrole=time
makes this unnecessarily difficult.Originally posted by @zcorpan in #2075 (comment)
The text was updated successfully, but these errors were encountered: