-
Notifications
You must be signed in to change notification settings - Fork 70
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
Should <input type="password">
be considered as form field?
#2123
Comments
The lack of a role mapping for Some other input types also have no ARIA role mapping, but map to various platform-specfic API roles (IA2_ROLE_DATE_EDITOR / AXTimeField / ROLE_SYSTEM_SPINBUTTON)
|
One way of doing this is looking at the platform-specific roles for controls with no ARIA role mapping. For
So you could use wording like the following: This rule applies to any element that is included in the accessibility tree, and that has:
The second item only applies for elements with no explicit role and marked as 'No corresponding role' in HTML AAM but have platform specific mappings. This looks like it can be extended to other input types like |
…s. inspired act-rules/act-rules.github.io#2123 (comment) - added corresponding unit tests. they pass.
* adding failing unit test. * adding more fialing tests. * adding type="password" fields to the applicability. seems to work i.e. make the tests pass. * adding expecations Outcomes specifically for the input type="password" case. * - expanded applicability to include many more type="" attribute values. inspired act-rules/act-rules.github.io#2123 (comment) - added corresponding unit tests. they pass. * changeset. * changeset. * Update packages/alfa-rules/src/sia-r8/rule.ts Co-authored-by: Jean-Yves Moyen <[email protected]> * Update packages/alfa-rules/test/sia-r8/rule.spec.tsx Co-authored-by: Jean-Yves Moyen <[email protected]> * Update packages/alfa-rules/test/sia-r8/rule.spec.tsx Co-authored-by: Jean-Yves Moyen <[email protected]> * Update packages/alfa-rules/test/sia-r8/rule.spec.tsx Co-authored-by: Jean-Yves Moyen <[email protected]> * Update packages/alfa-rules/test/sia-r8/rule.spec.tsx Co-authored-by: Jean-Yves Moyen <[email protected]> * Update packages/alfa-rules/test/sia-r8/rule.spec.tsx Co-authored-by: Jean-Yves Moyen <[email protected]> * Update packages/alfa-rules/test/sia-r8/rule.spec.tsx Co-authored-by: Jean-Yves Moyen <[email protected]> * Update packages/alfa-rules/test/sia-r8/rule.spec.tsx Co-authored-by: Jean-Yves Moyen <[email protected]> * fixing recently-introduced compilation error, I think. * fixing recently-introduced error in test. * changing import style as per review advice at #1667 (comment) * tightening up the types by using the same InputType type that hasInputType uses (instead of string). as per review comment at #1667 (comment) * removing unused import. * Update packages/alfa-rules/test/sia-r8/rule.spec.tsx Co-authored-by: Jean-Yves Moyen <[email protected]> * making new experimental rule: sia-er8. (as per review comment at #1667 (review) ) so this commit effectively reverts sia-r8. * changeset. * refactoring as per review comment at #1667 (comment) * Extract API * Update .changeset/swift-meals-check.md Co-authored-by: Jean-Yves Moyen <[email protected]> * Update packages/alfa-rules/src/experimental.ts Co-authored-by: Jean-Yves Moyen <[email protected]> * Update packages/alfa-rules/src/sia-er8/rule.ts Co-authored-by: Jean-Yves Moyen <[email protected]> * Update packages/alfa-rules/src/sia-er8/rule.ts Co-authored-by: Jean-Yves Moyen <[email protected]> * minor fixes - consequent to the review at #1667 (review) * Extract API --------- Co-authored-by: Jean-Yves Moyen <[email protected]> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
As per HTML AAM,
<input type="password">
elements have no role.This means that they are not considered by most of our "form fields" rules, among other Form field has non-empty accessible name, therefore we do not flag
<input type="password">
as missing an accessible name, while it seems that it should.I do remember us already doing some tricks around
<input type="password">
in #1612It looks like we should update a few more rules for that.
The text was updated successfully, but these errors were encountered: