-
Notifications
You must be signed in to change notification settings - Fork 4
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
(mobile a11y) I hear percentages when using number spinners VO on iOS #283
Comments
To reproduce, use VO on iOS and adjust the number spinners. |
Oh, I think it is the actual value of the number spinner. Maybe iOS is not getting aria-valuetext values. |
This one might be easier than I originally thought. |
I'm not so sure, as that is what the values are currently, here is a copy from the a11y view copy on startup. Note that they have valuetext and valuenow. Yet still you get percents. I can test on my iOS iPad next week. <div data-trail-id="1127-1128-1506-1512-1507-1794-1813-1811-1789" id="1127-1128-1506-1512-1507-1794-1813-1811-1789"
data-focusable="false" class="pdom-sibling" tabindex="-1"><label
data-trail-id="1127-1128-1506-1512-1507-1794-1813-1811-1789-1728-1727-1669"
id="label-1127-1128-1506-1512-1507-1794-1813-1811-1789-1728-1727-1669" data-focusable="false" class="pdom-sibling"
for="1127-1128-1506-1512-1507-1794-1813-1811-1789-1728-1727-1669" tabindex="-1">Left Value</label><input
data-trail-id="1127-1128-1506-1512-1507-1794-1813-1811-1789-1728-1727-1669"
id="1127-1128-1506-1512-1507-1794-1813-1811-1789-1728-1727-1669" data-focusable="true" class="pdom-sibling"
type="range" aria-orientation="vertical" aria-valuetext="1" min="1" max="10" step="1" aria-valuenow="1"
aria-roledescription="number spinner" tabindex="-1">
<p class="pdom-style" tabindex="-1" style="opacity: 0.55;">1</p><label
data-trail-id="1127-1128-1506-1512-1507-1794-1813-1811-1789-1788-1787-1729"
id="label-1127-1128-1506-1512-1507-1794-1813-1811-1789-1788-1787-1729" data-focusable="false" class="pdom-sibling"
for="1127-1128-1506-1512-1507-1794-1813-1811-1789-1788-1787-1729" tabindex="-1">Right Value</label><input
data-trail-id="1127-1128-1506-1512-1507-1794-1813-1811-1789-1788-1787-1729"
id="1127-1128-1506-1512-1507-1794-1813-1811-1789-1788-1787-1729" data-focusable="true" class="pdom-sibling"
type="range" aria-orientation="vertical" aria-valuetext="2" min="1" max="10" step="1" aria-valuenow="2"
aria-roledescription="number spinner" tabindex="-1">
<p class="pdom-style" tabindex="-1" style="opacity: 0.55;">2</p></div> |
@zepumph, what is the purpose of the two P elements with content 1 and 2? |
Yes the aria attributes look correct. I will check my voice over settings. Maybe I have some weird setting turned on. |
I tested dev version 78 on both my phones. I don't think I have enabled any weird VO settings. And, @zepumph, I am curious about the purpose of the two P elements with content 1 and 2? <p class="pdom-style" tabindex="-1" style="opacity: 0.55;">1</p> and <p class="pdom-style" tabindex="-1" style="opacity: 0.55;">2</p> |
@zepumph, I tested the pdom code on my macbook pro in a plain
I did notice that your code uses all HTML5 attributes for the number spinner values, i.e., I don't know if it will make any difference. There is one noticeable difference on my local machine in plain HTML. For some unknown reason, when I used the HTML5 attributes the sliders go from 1 to 10, but when I use the exact same values with aria attributes, the values are ignored and the sliders go from 1 to 100. I am not sure if the common code of the number spinners has always used HTML5 attributes or ARIA attributes. |
I just tested the number spinners in gravity-force-lab-basics, and I do not hear percentages on them. |
@zepumph, the same HTML5 attributes are used in GFLB's number spinners, however, there are some differences in the code.
I don't think any of these are significant differences, but something is different between the GFLB number spinners and the RaP number spinners. |
@KatieWoe reported over in #313:
|
Oh sorry, that was from copying from the a11y view, ignore that. |
Most of the discrepancy you are discussing above is because I copied from the COPY in the a11yview, not the HTML in the sim. I'm sorry, I think that made for quite a bit of red herring in the above investigation. Here is a better copy directly from the sim. I also cleaned up some of the superfluous attributes for clarity. <label
id="label-1127-1128-1506-1512-1507-1794-1813-1811-1789-1728-1727-1669"
for="1127-1128-1506-1512-1507-1794-1813-1811-1789-1728-1727-1669"
style="top: 706.392px; left: 564.39px; width: 43.9883px; height: 68.3242px;">Left Value</label>
<input
id="1127-1128-1506-1512-1507-1794-1813-1811-1789-1728-1727-1669"
type="range" aria-orientation="vertical" aria-valuetext="1" min="1" max="10" step="1" aria-valuenow="1"
aria-roledescription="number spinner"
style="top: 706.392px; left: 564.39px; width: 43.9883px; height: 68.3242px;">
<label
id="label-1127-1128-1506-1512-1507-1794-1813-1811-1789-1788-1787-1729"
for="1127-1128-1506-1512-1507-1794-1813-1811-1789-1788-1787-1729"
style="top: 706.392px; left: 646.981px; width: 43.9883px; height: 68.3242px;">Right Value</label>
<input
id="1127-1128-1506-1512-1507-1794-1813-1811-1789-1788-1787-1729"
type="range" aria-orientation="vertical" aria-valuetext="2" min="1" max="10" step="1" aria-valuenow="2"
aria-roledescription="number spinner" style="top: 706.392px; left: 646.981px; width: 43.9883px; height: 68.3242px;"> Here is a copy of one from GFLB: <label
id="label-380-381-481-487-482-643-644-620-619-618-604"
for="380-381-481-487-482-643-644-620-619-618-604"
style="top: 568.269px; left: 190.409px; width: 40.7049px; height: 54.5472px;">Mass 1</label>
<input
id="380-381-481-487-482-643-644-620-619-618-604"
type="range" aria-orientation="vertical" aria-valuetext="2 billion kilograms" min="1" max="10"
step="1" aria-valuenow="2" aria-roledescription="number spinner"
style="top: 568.269px; left: 190.409px; width: 40.7049px; height: 54.5472px;"> The only difference that I see are words in the aria-valuetext, perhaps VO is converting a single number ("1") into a percent somehow. When I am back with my iPad next week, I will test out and see if adding words to the value-text fixes this. Otherwise I am a bit stumped. |
@zepumph, that an interesting hypothesis. Since we only have 10 values, can you try just spelling out the values, one, two, three ... ten as a test? |
I spelled them out and it worked. I wasn't sure if you wanted me to do this anywhere else but for the values of the number spinners. Should I change the description like "Current challenge 1 to 2" to use words also? Just let me know what you would like, and please review. If so I would apply this patch: Index: js/common/view/describers/RatioDescriber.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/js/common/view/describers/RatioDescriber.js b/js/common/view/describers/RatioDescriber.js
--- a/js/common/view/describers/RatioDescriber.js (revision e79314ec684b3f02471c8c9897aa64231935397f)
+++ b/js/common/view/describers/RatioDescriber.js (date 1609448625214)
@@ -132,8 +132,8 @@
*/
getCurrentChallengeSentence( antecedent, consequent ) {
return StringUtils.fillIn( ratioAndProportionStrings.a11y.ratio.currentChallenge, {
- targetAntecedent: antecedent,
- targetConsequent: consequent
+ targetAntecedent: this.getWordFromNumber( antecedent ),
+ targetConsequent: this.getWordFromNumber( consequent )
} );
}
|
That’s a great question. For consistency and assurance, it might be nice to change the Challenge numbers to words. I am assuming there are only 3 options and this would be an easy change. We only had trouble with the number spinners, but screen readers can treat numbers differently, so best to spell out the challenge options, too. |
Note, I haven’t reviewed yet. |
I just tested master from bayes/phettest and I no longer hear precentages. Just going to double check on my other device. |
Hmm, with iOS 13.5.1 (not the latest iOS) on my iPhone 8 the sim doesn't load. The splash screen progress bar just keeps flashing. To test there I will need a dev version. I think it is safe to close this issue since I am no longer hearing percentages with the numbers on the number spinner spelled out. Regarding, spelling out the other numbers (see comment #283 (comment)), I don't think it is necessary since they did not cause any trouble. We'll have to keep this issue in mind for future sliders and number spinners. |
I would like to find a place to document this generally. This doesn't block publication though. |
Or perhaps this problem came about because our default aria-valuetext is just the value. Perhaps we should remove that case, and the screen reader will just read the value from aria-valuenow. I will need to some testing on this. It is for after an RC is made. |
I tried removing aria-valutext by default in phetsims/sun#681 (comment), and it didn't get rid of the percents, so I bailed. I then realized that this is potentially more than just a documentation problem. Percents will likely be spoken on iOS + VO for any AccessibleValueHandler that doesn't provide non-default aria-valuetext. So I created phetsims/sun#682. Closing |
When using dev version 78 on iOS 13.5.1 I hear percentages
This happens when adjusting the number spinners.
I am not sure what the percentages are representing.
The text was updated successfully, but these errors were encountered: