Read-only means not editable now, but still selectable and copyable
Aliases: readonly versus disabled · copyable read-only · inert text
What it is
Read-only means “this value cannot be changed now,” not “this value is not in the interaction.” The slot stays in the focus order; the text can still be selected, copied, and spoken. Painting an input that cannot be selected, or replacing it with unfocusable static text, drops the “still content” half of read-only. The issue is not editable but still takeable, not disabled’s “the capability is off,” and not whether the two looks alike.
Why it happens
Read-only shows up when a value is already settled but still needs to be taken elsewhere: an order ID, a generated callback URL, a field someone else filled that you may only see. The next act is often copy. readonly keeps focus and selection; disabled usually lifts the control out of the interaction, so copy needs another inlet. If read-only is implemented as disabled, Tab skips it, a screen reader may not speak the value, and copy depends on dragging static letters—which is nearly impossible on touch. Read-only may look quieter, but hit-testing must still give the text to selection, not to “nothing happens.”
Studying it
Compare read-only, disabled, and static text on the task “paste this value into the next field.” Record whether it can be selected, whether the keyboard can reach it, whether a screen reader speaks it. Factors: platform (desktop versus touch), value length. Outcomes: copy success, time to acquire. Assistive-tech users should be walked separately: is the read-only field still in focus order? Do not replace “can I take the value” with “it looks uneditable.”
Where it stops holding
A secret read-only value (a revealed key) may forbid copy; that wants an explicit Copy plus an audit, not a smuggle through disabled. Long read-only text is still hard to select on touch; it needs an explicit copy button. Values that change on a timer (a live rate) make a selection a stale snapshot; copy should timestamp. A purely presentational heading is not a read-only input and need not be an input.
Applying it
- Use read-only, not disabled, for “cannot edit but must copy”; keep it focusable and selectable.
- On touch, give such values a copy button; do not rely on press-and-hold selection.
- Let a screen reader speak the value and “read only”; do not skip it in focus order.
- Verify by selecting and copying from the read-only slot with the keyboard only; then copy once more on a phone with the pointer off. Failure or a skipped focus means read-only was built as disabled or dead text.
Related
- Within the group: E2.21.2 Disabled means the capability is off and usually not interactive · E2.21.3 Similar looks hide whether unlock can even be asked for · E2.21.4 A disabled reason must be discoverable; read-only must say when editing returns
- Adjacent: E2.01 Single-line text fields · E2.09 Password fields
- Search terms:
read-only still selectable·readonly·copyable value