When you want to indicate that an interactive element works but is not editable, set aria-readonly="true"
. This indicates to the user that an interactive element that would normally be focusable and copyable has been placed in a read-only (not disabled) state.
When aria-readonly
is set to true
, it means the user can read but not set the value of the widget. Read-only elements are still relevant to the user, so you should not prevent the user from navigating to the element or its focusable descendants or copying the value.
Examples include:
If the non-changeable value shouldn't be able to receive focus, use aria-disabled
instead.
Note: When using semantic HTML form controls, if you set the readonly
attribute, you don't need to include aria-readonly="true"
.
Note: The value of <input type="checkbox">
can not be edited making readonly
not relevant. However, when creating checkboxes with role="checkbox"
the aria-readonly
attribute is supported.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4