Loading...
The home where you level up — daily 3-minute lessons.
Save my spotbutton:disabled {
opacity: 0.5;
}button:disabled,
button[aria-disabled='true'] {
opacity: 0.6;
cursor: not-allowed;
}aria-disabled buttons stay focusable but don't match :disabled, so they need the attribute selector too.
div as disabled with :disabled, which only matches form elements.pointer-events: none as the only disabled state, while keyboard users can still activate it.aria-disabled='true' are styled with [aria-disabled='true'], not :disabled.<fieldset> are expected to match :disabled too.disabled removes the control from focus and form data. aria-disabled only tells assistive tech, so behavior must be blocked in JavaScript.
No. Disabled controls are not included in form data. Use readonly if the value must be sent.

Daily 3-minute lessons to understand your AI's code.