You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Elements with the "button" role support determining their accessible name from their content, and it's possible for internal elements to have no text content but instead specify their accessible name via a "title" attribute. For example:
<button><spantitle="Name from child title"></span></button>
This can come up, for example, when using internal elements that display an icon.
Unfortunately, calling computeAccessibleName on such a button returns an empty string, whereas it should return 'Name from child title'. The correct title can be viewed, for example, in the accessibility tree of Chrome devtools:
Calling computeAccessibleName on the inner element returns the correct accessible name.
Yep having this same issue -- check out a hackernews 'upvote' button/link, you'll notice the title is not included in the computed accessible name nor description
Elements with the "button" role support determining their accessible name from their content, and it's possible for internal elements to have no text content but instead specify their accessible name via a "title" attribute. For example:
This can come up, for example, when using internal elements that display an icon.
Unfortunately, calling
computeAccessibleName
on such a button returns an empty string, whereas it should return'Name from child title'
. The correct title can be viewed, for example, in the accessibility tree of Chrome devtools:Calling
computeAccessibleName
on the inner element returns the correct accessible name.I've set up a replication in Codepen: dom-accessibility-api accessible name bug reproduction
The text was updated successfully, but these errors were encountered: