-
Notifications
You must be signed in to change notification settings - Fork 2
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
Test for a11y #11
Comments
Just to keep some notes on what I'm considering:
These are packages that will be available in the JSON file of the project and can be used by other developers. I did install the chrome accessibility developer tools for local testing and I'm considering the installation of a screen reader like ChromeVox |
Having automated tests for a11y would be awesome. Please, make a list of devices and screen readers you intend to test on. |
Right now I'm trying to make it work on my pc using chrome and the ChromeVox extension (as my screen reader) and as a mobile device I borrowed an iphone, but I have some trouble with the dropdowns. I notice that different screen-readers behave a little differently from one another for example the ChromeVox extension reads the token as a whole while the iphone reads one element of the token at a time (I think that is a problem with the chrome extension but I don't have the information I need to be sure). I'm trying to use react-a11y and I have to say that it gives useful advice I think at some point it could be added to the project JSON. |
Nest steps:
|
Traget platforms and tools:
|
I'm sorry I didn't update you on the status of the work, in this branch you will find my attempt to add accessibility. |
Just tested with JAWS.
Edit: Chrome is not fully supported by JAWS, the component in Firefox works with JAWS |
A little update on an experimental accessibility support for addition and deletion of token: In my code I tried adding in the render method of FacetedTokenInput: ...
{ /* the following div needs to be hidden if this code is going into the master branch */ }
<div id="a11ysupport" aria-live="polite" aria-relevant="additions" aria-atomic="true">
{ /* simply add all the tokens that exist in the input */ }
{ tokens.map(this.a11ySupport, this) }
</div>
... and I added this method: // this should add a node that should be detected by aria-live="true"
a11ySupport(token, index) {
const { facet, description } = this.props.renderToken(token);
return (
<p key={ "test" + index }>
{ facet }
{ ' ' }
{ description }
{ ' ' }
</p>
)
} Since I was trying to mimic the behaviour of gmail I looked at its code and google uses a similar method in fact when you add a contact to your email and create a "token" this NOTE: the text inside the div is in italian <div aria-live="polite" aria-atomic="true" style="position: absolute; top: -1000px; height: 1px; overflow: hidden;">
{ here they add what is written before the @ or the name in your contact list } aggiunto.
Premi backspace per rimuovere il destinatario.
</div> |
Some useful documentation on the argument: General WAI-ARIA stuff: -periodic table of aria roles: this is a comprehensive list of all the possible aria 1.0 roles
Examples can be found here. aria-live in particular:
Examples of live regions: In the set there isn't an example of the |
Do we have a compatibility table for |
Browser compatibility:
Screen readers compatibility:
|
Reopen for test |
(
a11y
means ‘Accessibility’)The text was updated successfully, but these errors were encountered: