Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Request for aria-description to set accessible description #891
For the accessible name/label of an element, there is aria-label to set the label directly and aria-labelledby to set it via reference to another node. However, for the description of an element, there is only aria-describedby. This requires providing extra descriptive content in a node elsewhere in the DOM to be referenced by
In developing, I've found that there are occasionally extra pieces of information that are visually understood but don't have a complete textual representation that need to be provided to AT users in order for it to make more sense. In order to provide that context, visually hidden nodes get added to the markup to expose them with
An example I've seen of this is on Twitter, where each tweet has a button for reply, retweet, and like. The button also includes the number of replies/retweets/likes there are. In this context, it's important that the button label matches the actual action the button has (reply/retweet/like), but it's also important to expose the information that indicates how many existing interactions there were (replies/retweets/likes). Twitter currently uses
Some of the benefits I see to having an
There's a long thread from 2011 that includes a request for aria-description.
Using aria-describebdby with hidden extra nodes is already a widely adapted technique giving extra information for screen reader users. Of course it comes with the aforementioned disadvantages creating extra DOM stuff, therefore a property symmetric to aria-label is highly appreciated.
But its score and usage must be clarified.
ACCDC wrote: " Of course this will also result in a tooltip for sighted mouse users too though."
With other words, since both of them will be overriding mapped to accessibleDescription, the APG requirement would be in this case to use the same text both for aria-description and the title attribute?
Or can there be other visible alternatives for sighted users being recommended?
Or should the usage of aria-description being limited to certain information for blind users and therefore NO visual information is needed at all? This could be also a valid use case since aria-label is also "invisible".
There is a way to populate the accessible name with text offscreen using
It would allow developers to add helpful notes for screen readers and would help in the following ways: