phetsims / molarity

"Molarity" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/molarity
GNU General Public License v3.0
2 stars 6 forks source link

Repeated name on Solution Values check box #133

Closed terracoda closed 5 years ago

terracoda commented 5 years ago

@twant, I am not sure why "Solution Values" is said twice when focus in placed on the checkbox. Could you investigate?

Screen Shot 2019-07-23 at 5 46 24 PM

You have the label element after theinput, and I am wondering if that is the only difference between this checkbox and the ones in GFL Basics where I don't hear this type of duplication. Though if I read with the cursor keys I do get the name twice, once on the label and once on the input.

Screen Shot 2019-07-24 at 12 45 03 AM
terracoda commented 5 years ago

This is not a new issue. It has been happening for a long time. Apologies for not posting earlier.

twant commented 5 years ago

@terracoda I've been trying to recreate this issue, but haven't been able to -- is there a particular way I should be trying to use my screenreader to get this issue? Thanks!

terracoda commented 5 years ago

@twant, to reproduce, just tab to the checkbox. However, I have to apologize for opening this issue...I could have sworn I was not hearing this label duplication in GFLB.

I am now hearing the duplication there, too. See screenshot below.

Screen Shot 2019-08-05 at 10 01 31 AM

This is just built-in duplication that cannot be avoided in a solution that is available to us. I have verified with an ARIA/screen reader expert that the only current way to avoid this label duplication is to nest the input element inside the label element, eliminating the need to use the for attribute. This type of nesting not possible in Scenery.

The other way to avoid duplication is to use an aria-label attribute instead of a native HTML label. I do not recommend this approach as it breaks the first rule of ARIA (only use ARIA if there is no native HTML solution available). I reserve the use of aria-label for very special cases with no visible text label.

I'll close this issue now.

terracoda commented 5 years ago

This issue, if resolvable, should be resolved generally, see also https://github.com/phetsims/inverse-square-law-common/issues/74#issuecomment-509356105