phetsims / scenery

Scenery is an HTML5 scene graph.
http://scenerystack.org/
MIT License
55 stars 12 forks source link

Add screen reader support #365

Open samreid opened 9 years ago

samreid commented 9 years ago

Together with sonification and keyboard support, screen reader support is an important part of accessibility. There is a document here that shows the text that should appear for Forces and Motion: Basics: https://drive.google.com/folderview?id=0BxzmBMhbP3nGSGVwQW80THpsanc&usp=sharing

Scenery will provide some support for screen readers, in parallel to how it is now providing initial support for keyboard accessibility.

samreid commented 9 years ago

@jbphet @jonathanolson @pixelzoom any suggestion for the name of the node key that will be used to provide the textual description of a scenery node? I was thinking of textDescription--what do you think?

pixelzoom commented 9 years ago

textDescription seems a little overly general. Does ARIA have a term for this? Will text-based scenery nodes (Text, HTMLText, MultiLineText,...) require this key, or will their text be used?

jonathanolson commented 9 years ago

I was curious whether the properties for focus should be grouped in some way like node.mutate( { focus: { ... }, ... }, or node.mutate( { focus: new Focusable( ... ) } ).

There's a very minor benefit to adding fewer mutate property names, but I don't think it's too significant.

Discussed briefly on Skype and I am fine with having all properties directly on the Node itself.

samreid commented 9 years ago

More text descriptions in this commit: https://github.com/phetsims/joist/commit/2b1fbf259a1c6318d7aaee6fe5989d849956e4c6

Does ARIA have a term for this?

Not sure. In some cases, it is just the innerHTML of a div. In other cases, aria provides a labeled-by attribute: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-labelledby_attribute

My implementation is currently using the innerHTML of an aria live region.

We could call it 'ariaLabel' or 'ariaText' to be clear that it is for the aria.

I'm hoping that text based scenery nodes and sun components will automatically use their text (plus some patterns) to create the text description/aria label.

samreid commented 9 years ago

I don't feel too strongly about this, but wondering if in the future we would want to use this text for anything other than ARIA. I'll schedule discussion for an upcoming meeting.

samreid commented 9 years ago

I'm ok with altText but no plans to work on this at the moment.

pixelzoom commented 5 years ago

@jessegreenberg or @jonathanolson can this ancient issue be closed? Seems like we've move well beyond this.