Skip to content

Commit

Permalink
Remove aria-disabled from disabled input docs and example (fixes #823) (
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-barrett authored Dec 14, 2022
2 parents 887ca08 + 35ed565 commit 7b7cfc2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* **html:** Added accessible attributes to menu bar (#815).
* **css:** Add style rule for the hidden attribute in global reset (#783).
* **html:** Use unambiguous date format in sidebar.
* **docs:** Remove aria-disabled from disabled form inputs.

# 16.0.1

Expand Down
3 changes: 1 addition & 2 deletions components/forms/01-input/input.config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,8 @@ variants:
id: search
- name: Disabled
notes: |
Disabled controls should have both the `disabled` attribute and `aria-disabled="true"`
Disabled controls should have the `disabled` attribute.
### Links
- [MDN `disabled`](https://developer.mozilla.org/docs/Web/HTML/Attributes/disabled)
- [MDN `aria-disabled`](https://developer.mozilla.org/docs/Web/Accessibility/ARIA/Attributes/aria-disabled)
2 changes: 1 addition & 1 deletion components/forms/01-input/input.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# disabled - boolean
#}
<label for="{{ id }}">{{ label|default('Label') }}</label>
<input type="{{ type|default('text') }}" id="{{ id }}" name="{% if name %}{{ name }}{% else %}{{ id }}{% endif %}"{% if class %} class="{{ class }}"{% endif %}{% if attrs %} {{ attrs|safe }}{% endif %}{% if placeholder %} placeholder="{{ placeholder }}"{% endif %}{% if required %} required aria-required="true"{% endif %}{% if disabled %} disabled aria-disabled="true"{% endif %}>
<input type="{{ type|default('text') }}" id="{{ id }}" name="{% if name %}{{ name }}{% else %}{{ id }}{% endif %}"{% if class %} class="{{ class }}"{% endif %}{% if attrs %} {{ attrs|safe }}{% endif %}{% if placeholder %} placeholder="{{ placeholder }}"{% endif %}{% if required %} required aria-required="true"{% endif %}{% if disabled %} disabled{% endif %}>

0 comments on commit 7b7cfc2

Please sign in to comment.