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

Is it possible to expose descendants of childrenArePresentational? #292

Open
Malvoz opened this issue Jun 7, 2020 · 9 comments
Open

Is it possible to expose descendants of childrenArePresentational? #292

Malvoz opened this issue Jun 7, 2020 · 9 comments

Comments

@Malvoz
Copy link

Malvoz commented Jun 7, 2020

The Maps For HTML Community Group has a custom <map> component, but in testing I had found that no child elements of <map> (I believe anything that isn't <area>) are being exposed in the accessibility tree.

Is it possible to tell UAs to expose descendants of childrenArePresentational?

@stevefaulkner
Copy link
Contributor

try adding a role to the map element, for example

<map role="group">
  <h1>test 2</h1>  
</map>

@Malvoz
Copy link
Author

Malvoz commented Jun 7, 2020

Thanks for the quick response @stevefaulkner, I should've described my previous attempts, which include adding role="region" (although specifying role isn't permitted for <map>), tabindex="0" (is focusable but node not exposed) amongst other things. I also tried aria-hidden="false", which I'm not sure is or should be capable of achieving what I want here, but that's not really implemented in browsers I think.

I've tried various things, here's screenshot of only a few attempts I tried just now based on your example suggestion:

@stevefaulkner
Copy link
Contributor

stevefaulkner commented Jun 7, 2020

@Malvoz thanks for the info, I see that it is causing issue in chrome, works fine in Firefox.

  • theoretically the role should override the native element role, so should not be childrenarepresentational=true,
  • aria-hidden=false will be of no help here for a number of reasons

Will look into it more on the morrow, it is late here now :-)

@zcorpan
Copy link
Member

zcorpan commented Jun 24, 2020

Is it specified somewhere that map should have childrenArePresentational?

@scottaohara
Copy link
Member

This behavior is not specified in this spec. Rather, I filed a bug against chromium https://bugs.chromium.org/p/chromium/issues/detail?id=1208405 since Firefox and Safari are working as expected.

Leaving this open for tracking purposes, but the ball should be in Chromium's court to fix this.

@Malvoz
Copy link
Author

Malvoz commented May 12, 2021

Oops, I forgot to link the chromium bug I filed: https://bugs.chromium.org/p/chromium/issues/detail?id=1147035. Sorry!

In that bug I incorrectly refer to wanting to change the implicit ARIA role, I probably meant to say ARIA semantics, I corrected that statement in a later comment. I hope it's not too confusing, it seems on their response I got my point across.

However, because it seemingly isn't defined anywhere that map should have childrenArePresentational I guess it's also incorrect for me to imply in that bug that a role is required to opt-out of that behavior. I think I should comment on my bug and refer to yours as superseding mine. Does that sound right to you @scottaohara?

@scottaohara
Copy link
Member

scottaohara commented May 12, 2021

yes @Malvoz, please refer to mine. it's not really even that the children are treated as presentational (eg role=presentation) - if it was then the child content would still be exposed, but have no roles exposed. The content is rather being flat out ignored.

From what i saw in testing today, the accessibility panels in chrome were exposing the correct information - but something is still weird since, again, regardless of being exposed in the a11y panel, none of the content is actually accessible to the screen readers when using only chromium browsers

@Malvoz
Copy link
Author

Malvoz commented Nov 5, 2021

I filed a bug against chromium https://bugs.chromium.org/p/chromium/issues/detail?id=1208405

@scottaohara The bug you filed was marked as fixed, though I'm not seeing (hearing) any improvements using NVDA. Perhaps I've misunderstood the bug and the fix, perhaps it should now be considered an NVDA issue that the non-area elements aren't announced in your attached HTML file?

@scottaohara
Copy link
Member

cc @aleventhal per above comment.

i haven't looked into it / didn't notice it was marked as fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants