maxlength attribute (html)
Screen Reader support level: partial (2/11)
On this page
About this feature
The min and max attributes indicate the allowed range of values for the element.
Age of results
Results across all tests for this feature range from a year ago to 5 years ago. Detailed dates and version information can be found in associated tests.
Caution
Failing or partial results may be out of date. The oldest result is from 5 years ago. Consider running the associated tests and contributing results.
Expectations
Screen Reader support by expectation
Expectation | JAWS | Narrator | NVDA | Orca | TalkBack | VoiceOver (iOS) | VoiceOver (macOS) | ||||
---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Edge | Chrome | Edge | Firefox | Firefox | Chrome | Safari | Safari | |
MUST convey when the maximum length is reached | none | none | none | none | none | none | none | none | supported | none | supported |
MAY convey the maximum length when navigating to an input | none | none | none | none | none | none | none | none | none | none | none |
Expectation: convey when the maximum length is reached
Rationale:
The attribute prevents characters beyond the maximum length from being entered. The user needs to know when the maximum length has been reached, so that they do not think that they are entering data when they are in fact not.
Strength of this expectation for different types of assistive technologies:
- Screen Readers: MUST
- Voice Control: NA
Examples:
- screen readers might announce an earcon when the user tries to enter data beyond the maximum length.
- screen readers might imply that the maximum length has been reached by not announcing anything when a user tries to enter data (usually the keypress is echoed)
Test | JAWS | Narrator | NVDA | Orca | TalkBack | VoiceOver (iOS) | VoiceOver (macOS) | ||||
---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Edge | Chrome | Edge | Firefox | Firefox | Chrome | Safari | Safari | |
HTML maxlength attribute test applied to: input[type="text"] element | none | none | none | none | none | none | none | none | supported | none | supported |
Expectation: convey the maximum length when navigating to an input
Rationale:
The user may wish to know the maximum length when navigating to an input, and before they enter any data.
Strength of this expectation for different types of assistive technologies:
- Screen Readers: MAY
- Voice Control: NA
Examples:
- screen readers might announce the maximum length when navigating to an input.
Test | JAWS | Narrator | NVDA | Orca | TalkBack | VoiceOver (iOS) | VoiceOver (macOS) | ||||
---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Edge | Chrome | Edge | Firefox | Firefox | Chrome | Safari | Safari | |
HTML maxlength attribute test applied to: input[type="text"] element | none | none | none | none | none | none | none | none | none | none | none |