зеркало из https://github.com/mozilla/gecko-dev.git
53b2e98767
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 |
||
---|---|---|
.. | ||
HTMLCanvasAccessible.cpp | ||
HTMLCanvasAccessible.h | ||
HTMLElementAccessibles.cpp | ||
HTMLElementAccessibles.h | ||
HTMLFormControlAccessible.cpp | ||
HTMLFormControlAccessible.h | ||
HTMLImageMapAccessible.cpp | ||
HTMLImageMapAccessible.h | ||
HTMLLinkAccessible.cpp | ||
HTMLLinkAccessible.h | ||
HTMLListAccessible.cpp | ||
HTMLListAccessible.h | ||
HTMLSelectAccessible.cpp | ||
HTMLSelectAccessible.h | ||
HTMLTableAccessible.cpp | ||
HTMLTableAccessible.h | ||
moz.build |