FreedomScientific / standards-support

Contains documentation for Vispero software support of Web standards
https://freedomscientific.github.io/standards-support/
GNU General Public License v3.0
105 stars 11 forks source link

Labels of list boxes are not emitted by JAWS in Forms mode when tags <label for=...> are used #766

Closed Vladimir-Goncharov-a11y closed 9 months ago

Vladimir-Goncharov-a11y commented 9 months ago

Summary

In Forms mode JAWS does not read accessible labels of listboxes if a label provided using <label for=...> tag.

Steps to reproduce

  1. Rename an extension of the attached sample file from .txt to .html and open it in Chrome. odan_397_github_766_no_label.txt
  2. Press Insert-F5, ensure that there is a list box labelled as "The Registry"
  3. Set PC Focus to the first edit field.
  4. Ensure that JAWS is in Forms mode (alt-del to check the current mode)
  5. Press Tab key to get into the listbox while JAWS is in Forms mode. The first option of the listbox gets focus.

--- JAWS transcript after the Tab key in step 5 ---

list with 2 items An accessible description Tomato 1 of 2 To move to an item press the Arrow keys.

--- end of JAWS transcript ---

The bug: The label of the listbox is not emitted by JAWS in Forms mode, but is accessible through Insert-F5.

Expected result

First, the label should be emitted, followed by the ARIA role, selected option, option coordinate (1 of two) and the description. --- /expected JAWS transcript after the Tab key in step 5 ---

The registry listbox Tomato 1 of 2 An accessible description To move to an item press the Arrow keys.

--- end of the expected transcript ---

Additional Information

It is interesting:

The bug is reproducible with the default JAWS settings (Insert-Space, z) The bug is reproducible with JAWS 2023 August release. The bug is reproducible with JAWS 2024 beta September release.

JAWS version and build number

JAWS version 2023.2307.37.400 JAWS version 2024.2308.124.400

Operating System and version

Microsoft Windows 10 Professional Version 22H2 (OS Build 19045.3448), System Type x64

Browser and version:

Google Chrome Version 116.0.5845.188

JAWS-test commented 9 months ago

This is not a JAWS bug, but a bug in your code. According to the HTML specification, the ul element is not an element that can be named with label (https://html.spec.whatwg.org/multipage/forms.html#category-label). Therefore, the browser transmits the element without a accessible name to the Accessibility API and JAWS cannot output a label.

There are two solutions for you

Please close this issue!

stevefaulkner commented 9 months ago

closing this as per @JAWS-test comment

Vladimir-Goncharov-a11y commented 1 month ago

@JAWS-test @stevefaulkner Agreed. Thanks.