Disable HTML Elements - Orange Digital Accessibility Guidelines
Có thể bạn quan tâm
- Home
- Articles
- Disable HTML elements
- Web
- Beginner
Disable form elements #
The disabled attribute is used to disable form elements
<button disabled>Delete</button> <input type="text" name="address" disabled>If a <fieldset> is disabled, the descendant form controls are all disabled.
<fieldset id="group" disabled> <input name="foo"> <input type="checkbox" name="bar"> <select name="values"> <option value="1">Value 1</option> <option value="2">Value 2</option> <option value="3">Value 3</option> </select> </fieldset>Disable a link #
To disable a link, unlike the previous technique, the use of the disabled attribute is not allowed. It is still possible to disable a link by following 3 steps:
- remove the href attribute so that it can no longer receive the focus
- add a role="link" so that it is always considered a link by screen readers
- add an attribute aria-disabled="true" so that it is indicated as being disabled
Check out Scott O'Hara's excellent article on the subject: Disabling a link.
On this page
- Disable form elements
- Disable a link
Từ khóa » Html A Tag Disabled
-
Disabled Href Tag - Javascript - Stack Overflow
-
Disable A HTML Link/anchor Tag - Code With Hugo
-
HTML Input Disabled Attribute - W3Schools
-
HTML Disabled Attribute - W3Schools
-
How To Disable Links | CSS-Tricks
-
How To Disable A HTML Anchor Tag
-
How To Disable A Anchor Tag In HTML? - NiceSnippets
-
HTML Attribute: Disabled - HTML: HyperText Markup Language | MDN
-
HTML Disabled Attribute - GeeksforGeeks
-
HTML | Disabled Attribute - GeeksforGeeks
-
How To Disable A Tag Code Example
-
HTMLSelectElement.disabled - Web APIs | MDN
-
Disabling A Link
-
HTML Button Disabled Attribute - Dofactory