phetsims / a11y-research

a repository to track PhETs research into accessibility, or "a11y" for short
MIT License
3 stars 0 forks source link

Discuss convention for all dynamic values in a11y strings be surrounded in <em> tags #60

Closed zepumph closed 6 years ago

zepumph commented 6 years ago

From a skype discussion with @jessegreenberg as well as https://github.com/phetsims/chipper/issues/610. It would be nice to solidify a convention for <em> now, while only a few sims have descriptions in them. In OL it seemed to work very nicely to have dynamic properties be surrounded by emphasis. Then in the a11y view they were highlighted nicely. BASE doesn't have any <em> tags though. It would be good to make sure that if we continue down a path where <em> tags get green/underlining in the a11y view because they are dynamic, then we are consistent.

@terracoda what do you think?

terracoda commented 6 years ago

@zepumph, I like this idea. One thing to keep in mind is that some screen readers actually read out emphasized text in a different voice. I have noticed that VO reads content in em tags in a higher pitch, for example. For Ohm's Law this is ideal because there is a natural fit for emphasis. It may not work nicely for all dynamic strings, especially sentences with multiple dynamic strings.

Would it be possible to have a couple of options based on the context? For example, <em> or <span class="dynamic"></span>. If we went the named class route, that would have built-in flexibility as it could be placed on any element, block-level or in-line, that contains a dynamic description.

zepumph commented 6 years ago

I like that a lot. I wonder how we could go about adding that class easily to places that are inherently dynamic. My opinion would be to keep class="dynamic" out of the a11y string files as much as possible.

jessegreenberg commented 6 years ago

My opinion would be to keep class="dynamic" out of the a11y string files as much as possible.

Agreed, especially since these strings will eventually be translatable.

jessegreenberg commented 6 years ago

I recently made https://github.com/phetsims/a11y-research/issues/67#issuecomment-358797815 in this issue but decided it is better in #67, so removing that comment from this thread.

jessegreenberg commented 6 years ago

In #67 we decided that all <em> tags that were used for styling should be <i> tags so that for consistency and so that we can use <em> tags to provide emphasis when necessary. This issue can be closed.