-
Notifications
You must be signed in to change notification settings - Fork 795
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
fix(accText): ignore text in embedded content elements #3022
Conversation
@@ -674,7 +674,7 @@ const htmlElms = { | |||
noAriaAttrs: true | |||
}, | |||
picture: { | |||
contentTypes: ['embedded', 'phrasing', 'flow'], | |||
contentTypes: ['phrasing', 'flow'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a mistake. figure
is not an embedded element. The img
inside it is. You can put text inside a picture along side the img and the text will be rendered. It also isn't described as embedded in the HTML spec:
https://html.spec.whatwg.org/multipage/grouping-content.html#the-figure-element
var params = checkSetup('<object id="target"></object>'); | ||
var params = checkSetup('<p id="target"></p>'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't know why we did that. Clearly that's wrong.
7bd16a4
to
b0c219c
Compare
Co-authored-by: Steven Lambert <2433219+straker@users.noreply.github.com>
* fix(accText): ignore text in embedded content elements Closes #3017 * Update lib/standards/html-elms.js * Update lib/standards/html-elms.js Co-authored-by: Steven Lambert <2433219+straker@users.noreply.github.com> Co-authored-by: Steven Lambert <2433219+straker@users.noreply.github.com>
Content inside embedded elements like
video
,canvas
,object
, etc. should be ignored in computing the accessible name.Closes issue #3017