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
Mozillians who can provide input (optional): @emilio
Other information
This feature will support ScrollToTextFragment in chromium, but it is perfectly useful to have it only implemented for find-in-page and element fragment navigation. The HTML spec for this feature omits ScrollToTextFragment.
FWIW, I'd like to advocate for this...for a11y reasons.
I see this as solution for an issue with navigation to any fragment id within a closed details element, e.g. landmark navigation.
Involves changing closed details elements to use content visibility hidden, rather than current handling.
I think this could be really problematic for screen reader users. On one hand, yes, it means that the entire content of a details element will be navigable with quick navigation, including headings, landmarks, etc. On the other hand, it means that as a user moves the screen reader browse cursor, they will always see the content of collapsed details elements, which somewhat defeats the point of them being collapsed. That could perhaps be accommodated on the screen reader side, but that would require changes in all screen readers and we'd need to think about backwards compat. I suspect the same is true for switch control.
I think this could be really problematic for screen reader users. On one hand, yes, it means that the entire content of a details element will be navigable with quick navigation, including headings, landmarks, etc. On the other hand, it means that as a user moves the screen reader browse cursor, they will always see the content of collapsed details elements, which somewhat defeats the point of them being collapsed.
Sorry; I think I misunderstood something here. I was assuming that if collapsed details elements were exposed to find-in-page, they would also be exposed to the a11y tree. If they aren't, please disregard my concern. Note, however, that this also means that landmark navigation, heading navigation, etc. (other than by the use of direct HTML links or other navigation to those things) wouldn't work inside collapsed details elements.
I was assuming that if collapsed details elements were exposed to find-in-page, they would also be exposed to the a11y tree. If they aren't, please disregard my concern.
Since collapsed details will use content-visibility:hidden, they will not be exposed to the accessibility tree.
this also means that landmark navigation, heading navigation, etc. (other than by the use of direct HTML links or other navigation to those things) wouldn't work inside collapsed details elements
Could you elaborate on landmark navigation and heading navigation? I'm not sure what you mean.
Note, however, that this also means that landmark navigation, heading navigation, etc. (other than by the use of direct HTML links or other navigation to those things) wouldn't work inside collapsed details elements.
That's correct. Currently the contents of a collapsed detail element are not exposed to AT, and this feature does not change this behaviour.
The feature enables some things, namely find-in-page scroll-to-text and fragment-link navigation, to open a details element automatically if the target of the search/navigation is within a collapsed details element.
This does not propose to change things like tab navigation, focus navigation, or landmark or heading navigation. All of these still will not be able to open a collapsed details element automatically.
The difficulty in providing this information to AT, in order for it to be able to do landmark navigation into a collapsed details element, is already mentioned above, namely the following:
it means that as a user moves the screen reader browse cursor, they will always see the content of collapsed details elements, which somewhat defeats the point of them being collapsed.
We agree that exposing all of the content in collapsed details elements seems to contradict the intent of the element. Please correct me if I'm wrong, but I don't believe there is currently a way to provide such content (hidden but potentially searchable) via AX.
I suppose that if the script calling scrollIntoView() wants to auto-expand details elements, it could just run the ancestor details revealing algorithm from within script before calling scrollIntoView().
I'm not sure how people would feel about making scrollIntoView() always expand details elements... it's distinct from find-in-page, ScrollToTextFragment, and element fragment navigation because scrollIntoView() is called by script in the page, rather than a searching and scrolling feature thats in the browser and hidden away from script.
I also took some time to look into landmark navigation, which lead me to this browser extension which finds landmarks and provides a way to "navigate" to them: https://github.com/matatk/landmarks
It looks like this extension uses element.scrollIntoView() and element.focus() to scroll the target landmark into view.
Within the context of this extension, it could add the ancestor details revealing algorithm like I mentioned above. I'm not aware of any other accessibility-specific code in the browser/spec that would search for text and scroll things into view like find-in-page that would be a candidate for this feature - if there are any I'm happy to look into it though!
We agree that exposing all of the content in collapsed details elements seems to contradict the intent of the element. Please correct me if I'm wrong, but I don't believe there is currently a way to provide such content (hidden but potentially searchable) via AX.
Activity
BillGoldstein commentedon Sep 22, 2021
FWIW, I'd like to advocate for this...for a11y reasons.
I see this as solution for an issue with navigation to any fragment id within a closed details element, e.g. landmark navigation.
Involves changing closed details elements to use content visibility hidden, rather than current handling.
jcsteh commentedon Sep 23, 2021
I think this could be really problematic for screen reader users. On one hand, yes, it means that the entire content of a details element will be navigable with quick navigation, including headings, landmarks, etc. On the other hand, it means that as a user moves the screen reader browse cursor, they will always see the content of collapsed details elements, which somewhat defeats the point of them being collapsed. That could perhaps be accommodated on the screen reader side, but that would require changes in all screen readers and we'd need to think about backwards compat. I suspect the same is true for switch control.
jcsteh commentedon Sep 23, 2021
Sorry; I think I misunderstood something here. I was assuming that if collapsed details elements were exposed to find-in-page, they would also be exposed to the a11y tree. If they aren't, please disregard my concern. Note, however, that this also means that landmark navigation, heading navigation, etc. (other than by the use of direct HTML links or other navigation to those things) wouldn't work inside collapsed details elements.
josepharhar commentedon Sep 23, 2021
Since collapsed details will use
content-visibility:hidden, they will not be exposed to the accessibility tree.Could you elaborate on landmark navigation and heading navigation? I'm not sure what you mean.
annevk commentedon Sep 23, 2021
They are functionality provided by AT, e.g., to skip directly to the third heading (some
<hx>element) in a document.vmpstr commentedon Sep 23, 2021
That's correct. Currently the contents of a collapsed detail element are not exposed to AT, and this feature does not change this behaviour.
The feature enables some things, namely find-in-page scroll-to-text and fragment-link navigation, to open a details element automatically if the target of the search/navigation is within a collapsed details element.
This does not propose to change things like tab navigation, focus navigation, or landmark or heading navigation. All of these still will not be able to open a collapsed details element automatically.
The difficulty in providing this information to AT, in order for it to be able to do landmark navigation into a collapsed details element, is already mentioned above, namely the following:
We agree that exposing all of the content in collapsed details elements seems to contradict the intent of the element. Please correct me if I'm wrong, but I don't believe there is currently a way to provide such content (hidden but potentially searchable) via AX.
josepharhar commentedon Sep 23, 2021
Here is a list of different ways I'm aware of that the browser scrolls into view or navigates to some text or element:
window.find()element.scrollIntoView()I also took some time to look into landmark navigation, which lead me to this browser extension which finds landmarks and provides a way to "navigate" to them: https://github.com/matatk/landmarks
It looks like this extension uses
element.scrollIntoView()andelement.focus()to scroll the target landmark into view.Within the context of this extension, it could add the ancestor details revealing algorithm like I mentioned above. I'm not aware of any other accessibility-specific code in the browser/spec that would search for text and scroll things into view like find-in-page that would be a candidate for this feature - if there are any I'm happy to look into it though!
I strongly agree with this view
emilio commentedon Sep 29, 2021
Yeah, I think this should be "worth prototyping" specially if there are no a11y concerns.
annevk commentedon Sep 29, 2021
Thanks all, closing this as there's no need for a dashboard entry. Please do comment if there's anything that was missed.