Skip to content
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

Merged
merged 3 commits into from
Jun 22, 2021
Merged

Conversation

WilcoFiers
Copy link
Contributor

@WilcoFiers WilcoFiers commented Jun 18, 2021

Content inside embedded elements like video, canvas, object, etc. should be ignored in computing the accessible name.

Closes issue #3017

@WilcoFiers WilcoFiers requested a review from a team as a code owner June 18, 2021 14:48
@@ -674,7 +674,7 @@ const htmlElms = {
noAriaAttrs: true
},
picture: {
contentTypes: ['embedded', 'phrasing', 'flow'],
contentTypes: ['phrasing', 'flow'],
Copy link
Contributor Author

@WilcoFiers WilcoFiers Jun 18, 2021

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>');
Copy link
Contributor Author

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.

lib/standards/html-elms.js Outdated Show resolved Hide resolved
Co-authored-by: Steven Lambert <2433219+straker@users.noreply.github.com>
@straker straker dismissed their stale review June 22, 2021 14:02

Resolved

@straker straker merged commit fa4f926 into develop Jun 22, 2021
@straker straker deleted the embedded-text branch June 22, 2021 14:02
straker added a commit that referenced this pull request Jun 22, 2021
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants