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
I started looking into fixing jupyterlab/jupyterlab#13045, which requires the aria-label to be set on various widgets, so that screen readers can announce the landmarks correctly. After looking at the source for a bit and asking for some feedback, it became clear that the issue could be addressed more generally at the upstream lumino Widget level.
Proposed Solution
I'm not that familiar with the lumino source yet, but the way I see it, the solution is to add an ariaLabel (not sure how hyphenated attributes are generally transformed into JS attributes in lumino) property to the Widget.IOptions and then the Widget can ensure that the the necessary HTML attributes are generated. Obviously not all Widgets will have an ariaLabel set, so it needs to be optional, in particular since for some Widgets ariaLabeledBy may be more appropriate.
Alternatively the "role" attribute solution could be re-used, making individual Widgets responsible for generating the aria-label attributes. However, that creates a lot of code-duplication (and I would be more inclined to suggest a second feature request to refactor that "role" support into the main Widget).
Additional context
Because I'm new to the lumino code-base, I will need some guidance, but I'm happy to contribute a PR to actually implement this.
The text was updated successfully, but these errors were encountered:
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋
I've now spent a bit more time with the source code and can see the reason for having it devolved into those widgets that need it and not having it in general as an option. So at this point I would really just want to start a discussion of whether to move this into the Widget or to leave as it is, in which case I would address the original JupyterLab issue in the JupyterLab codebase.
I agree with you to not make in a general option because then people may start to want more and more aria attributes as part of the JavaScript API. Moreover it may enter in conflict for element that are labelled by another one.
Problem
I started looking into fixing jupyterlab/jupyterlab#13045, which requires the aria-label to be set on various widgets, so that screen readers can announce the landmarks correctly. After looking at the source for a bit and asking for some feedback, it became clear that the issue could be addressed more generally at the upstream lumino Widget level.
Proposed Solution
I'm not that familiar with the lumino source yet, but the way I see it, the solution is to add an ariaLabel (not sure how hyphenated attributes are generally transformed into JS attributes in lumino) property to the Widget.IOptions and then the Widget can ensure that the the necessary HTML attributes are generated. Obviously not all Widgets will have an ariaLabel set, so it needs to be optional, in particular since for some Widgets ariaLabeledBy may be more appropriate.
Alternatively the "role" attribute solution could be re-used, making individual Widgets responsible for generating the aria-label attributes. However, that creates a lot of code-duplication (and I would be more inclined to suggest a second feature request to refactor that "role" support into the main Widget).
Additional context
Because I'm new to the lumino code-base, I will need some guidance, but I'm happy to contribute a PR to actually implement this.
The text was updated successfully, but these errors were encountered: