Skip to content
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

Consider creation of a fieldsize/maxlength property #1119

Open
joanmarie opened this issue Nov 14, 2019 · 8 comments
Open

Consider creation of a fieldsize/maxlength property #1119

joanmarie opened this issue Nov 14, 2019 · 8 comments
Assignees
Labels
deep-dive feature may add new concept(s) to ARIA which will require implementations or APG changes
Milestone

Comments

@joanmarie
Copy link
Contributor

HTML has a maxlength property on text and textarea. This property currently controls how many characters can be input. For instance, a PIN field limited to 4 characters.

At the present time, this is not mapped on any platform, but I can imagine a screen reader user wanting to know that a field only accepts 4 characters. This information tends to be obvious to sighted users (input stops going into the field), but might not be to users who are blind.

@joanmarie joanmarie self-assigned this Nov 14, 2019
@joanmarie joanmarie added this to the ARIA 1.3 milestone Nov 14, 2019
@jnurthen jnurthen modified the milestones: ARIA 1.3, ARIA 1.4 Mar 18, 2021
@benbeaudry
Copy link
Contributor

@jnurthen This came up today internally. What's the timeline for 1.4?

@douggeoffray
Copy link

We are seeing this used more and more. The current guidance is to be exposing character count information through live regions which is an oversized hammer. This seems easily mapped into platform APIs along with the current count. This information would allow screen readers to expose the information best for their users. I have discussed with NV Access and Vispero and they are onboard with mapping these to existing IA2/UIA properties.

@jnurthen jnurthen added the feature may add new concept(s) to ARIA which will require implementations or APG changes label Sep 12, 2023
@jnurthen jnurthen assigned smhigley and unassigned joanmarie Nov 16, 2023
@smhigley
Copy link
Contributor

smhigley commented Nov 16, 2023

The UIA mapping would be the RangeValue control pattern: https://learn.microsoft.com/en-us/windows/win32/winauto/uiauto-implementingrangevalue

The IA2 mapping appears to be the IAccessibleValue::maximumValue pattern, though external confirmation would be good: https://accessibility.linuxfoundation.org/a11yspecs/ia2/docs/html/interface_i_accessible_value.html#a55e179b8a504a0c44049f6d4edd0bc79

ATK looks like atk_value_get_range: https://gnome.pages.gitlab.gnome.org/atk/AtkValue.html#atk-value-get-range (@joanmarie, does that look right?)

[Edited by James] I found maxValue but @cookiecrook confirmed that's for range values, not maxlength. https://developer.apple.com/documentation/appkit/nsaccessibility/attribute/1525668-maxvalue

@joanmarie
Copy link
Contributor Author

joanmarie commented Nov 16, 2023

@smhigley The ATK/AT-SPI2 value interface is intended for numeric ranges (progress bars, spin buttons, sliders, etc., etc.). For instance, in the case of a spin button that lets you select a numeric month, the range is 1 (min) - 12 (max). The maxlength would be 2. (Right?)

I'm afraid that for specifying the maximum number of characters which can be input in a text input, there's not any good API for that. So the mapping should be.... wait for it.... yet another object attribute. 😀

Thanks for checking and please let me know if you have any questions.

@smhigley
Copy link
Contributor

@smhigley
Copy link
Contributor

Plan going forward:

  1. Map html maxlength to metadata on chars remaining
  2. create aria-remaining-style attr to map chars remaining (including negative values)
  3. check with AT vendors on if they like the idea, and if they could use existing events to do useful things (e.g. bonks) with it

related: VO bonking bugzilla issue: https://bugs.webkit.org/show_bug.cgi?id=271831

@jnurthen
Copy link
Member

Minutes from today https://www.w3.org/2024/03/28-aria-dive-minutes.html

@scottaohara
Copy link
Member

scottaohara commented May 14, 2024

a topic that came up today is supporting instances of where a text field needs to convey the max length, but also might allow people to type over that length (e.g., twitter allows one to type whatever they want, but if you are beyond the max length then the tweet wont be allowed to publish)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deep-dive feature may add new concept(s) to ARIA which will require implementations or APG changes
Projects
None yet
Development

No branches or pull requests

7 participants