Closed JAWS-test closed 10 months ago
I believe this is a duplicate of #46
@MotassemJa
I believe this is a duplicate of https://github.com/FreedomScientific/standards-support/issues/46
This is partly correct, but not completely:
As long as the problem is not solved, the ARIA-listbox with grouping is a good workaround
@JAWS-test thanks for the detailed reply. When using the aria-listbox, JAWS will not announce the label of each group. On the other hand, using a treeview would make JAWS announce it. Do you believe I should extend the listbox to force JAWS to read the labels of each group, or just use the treeview?
@MotassemJa
When using the aria-listbox, JAWS will not announce the label of each group
I cannot confirm that. JAWS 2023 (and older versions), in combination with Firefox, Chrome and Edge, outputs the group label correctly when navigating through the ARIA listbox with the arrow keys. Which test environment are you using?
I have spent some time working on this issue. What i have found is that (I think its due to how native select>optgroup>option
is rendered), it differs between Firefox and Chrome and between size=1
and size>1
the differences effect both NVDA and JAWS and there are disparities between how the information is announced (or not announced) across browsers and screen readers.
From the chrome issue:
In any case, we need to refactor our support for
<select>
, which is a medium to large task.In the meantime, this is an unfortunate gap in our support.
While @JAWS-test suggests using ARIA listbox as a work around:
As long as the problem is not solved, the ARIA-listbox with grouping is a good workaround
I have found through trial and error, a work around, so native selects can be coded (with a little ARIA) to consistently announce the information in both NVDA and JAWS in Firefox and Chrome.
Using aria-label
with a text string that includes the option label and the group label, the information is consistently announced by both JAWS and NVDA in Chrome and Firefox in the case of select
size=1
(in both collapsed and expanded states) and size>1
EXAMPLE CODE
<optgroup label="fruits">
<option aria-label="fruits apple">apple
<option aria-label="fruits pear">pear
</optgroup>
Can be re-opened once browser bugs are fixed
Summary
optgroup is not output
Expected result
Actual result
Some of the problems have existed for many years.
Firefox
Chrome
IE
Recommendation
Since many other problems occur in connection with the output of select elements (this is especially true for select size>1 and select multiple), it is recommended not to use them and to use checkboxes (multiple selection) or radio buttons (single selection) instead. Instead of optgroup, fieldset and legend can be used.
Additional Information
JAWS version and build number
JAWS 2019.1906.10
Operating System and version
Windows 8
Browser and version:
Internet Explorer 11.0.9600.19431 Chrome 76.0.3809.100 Firefox 68.0.2