gecko-dev/accessible/html
James Teh 53b2e98767 Bug 1661923: Expose file input as a button in the a11y tree rather than a group. r=eeejay
A file input contains two native anonymous children: the Browse button and the file name label.
Previously, we exposed the file input as a group in the a11y tree and its anonymous children as children of that group.
While this is semantically correct, it causes several problems for screen readers.
First, if the author provides a label or description, that gets exposed on the group.
Some screen readers ignore either one or the other depending on the screen reader, what the author specified and how the user navigated there.
Second, the file name label isn't focusable and wasn't associated to the group in any way aside from being a child.
This meant that a screen reader user might not perceive it in some cases.

Since most users understand a file input as a single control anyway, we now just expose the input as a simple button containing two text leaves.
However, unlike most buttons, we need to append the text to the name even if the author specifies a name.
As a bonus, this simplifies some code, since we no longer need to redirect focus or events.

An additional problem was that the file input previously returned false for LocalAccessible::IsWidget, which meant that a wrapping HTML label wasn't associated correctly.
This has been fixed as well, although this fix could have applied just as easily to the previous group implementation.

Differential Revision: https://phabricator.services.mozilla.com/D191264
2023-10-23 23:38:13 +00:00
..
HTMLCanvasAccessible.cpp Bug 1845883: Remove HyperTextAccessibleWrap. r=nlapre 2023-08-02 01:42:17 +00:00
HTMLCanvasAccessible.h Bug 1845883: Remove HyperTextAccessibleWrap. r=nlapre 2023-08-02 01:42:17 +00:00
HTMLElementAccessibles.cpp Bug 1845883: Remove HyperTextAccessibleWrap. r=nlapre 2023-08-02 01:42:17 +00:00
HTMLElementAccessibles.h Bug 1845883: Remove HyperTextAccessibleWrap. r=nlapre 2023-08-02 01:42:17 +00:00
HTMLFormControlAccessible.cpp Bug 1661923: Expose file input as a button in the a11y tree rather than a group. r=eeejay 2023-10-23 23:38:13 +00:00
HTMLFormControlAccessible.h Bug 1661923: Expose file input as a button in the a11y tree rather than a group. r=eeejay 2023-10-23 23:38:13 +00:00
HTMLImageMapAccessible.cpp Bug 1844238 part 1: Change includes of Role.h to mozilla/a11y/Role.h. r=eeejay 2023-07-26 02:19:41 +00:00
HTMLImageMapAccessible.h Bug 854796: Anchor, area elements without href shouldn't have link role, r=Jamie,devtools-reviewers 2023-07-24 19:31:29 +00:00
HTMLLinkAccessible.cpp Bug 1845883: Remove HyperTextAccessibleWrap. r=nlapre 2023-08-02 01:42:17 +00:00
HTMLLinkAccessible.h Bug 1845883: Remove HyperTextAccessibleWrap. r=nlapre 2023-08-02 01:42:17 +00:00
HTMLListAccessible.cpp Bug 1845883: Remove HyperTextAccessibleWrap. r=nlapre 2023-08-02 01:42:17 +00:00
HTMLListAccessible.h Bug 1845883: Remove HyperTextAccessibleWrap. r=nlapre 2023-08-02 01:42:17 +00:00
HTMLSelectAccessible.cpp Bug 1845883: Remove HyperTextAccessibleWrap. r=nlapre 2023-08-02 01:42:17 +00:00
HTMLSelectAccessible.h Bug 1845883: Remove HyperTextAccessibleWrap. r=nlapre 2023-08-02 01:42:17 +00:00
HTMLTableAccessible.cpp Bug 1845883: Remove HyperTextAccessibleWrap. r=nlapre 2023-08-02 01:42:17 +00:00
HTMLTableAccessible.h Bug 1845883: Remove HyperTextAccessibleWrap. r=nlapre 2023-08-02 01:42:17 +00:00
moz.build Bug 1738401 - Remove -Wno-shadow warning suppressions. r=firefox-build-system-reviewers,glandium 2021-12-01 06:40:04 +00:00