Skip to content

Commit

Permalink
Use boolean for disabled attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrobertlloyd committed Nov 20, 2024
1 parent e7b5a1c commit e6656d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/components/button/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Find out more about the button component and when to use it in the [NHS digital
#### HTML markup

```html
<button class="nhsuk-button" type="submit" disabled="disabled" aria-disabled="true" data-module="nhsuk-button">
<button class="nhsuk-button" type="submit" disabled aria-disabled="true" data-module="nhsuk-button">
Disabled button
</button>
```
Expand Down
2 changes: 1 addition & 1 deletion packages/components/button/template.njk
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

{# Define common attributes we can use for both button and input types #}
{%- set buttonAttributes %}{% if params.name %} name="{{ params.name }}"{% endif %} type="{{ params.type if params.type else 'submit' }}"
{%- if params.disabled %} disabled="disabled" aria-disabled="true"{% endif %}
{%- if params.disabled %} disabled aria-disabled="true"{% endif %}
{%- endset -%}

{% if element == 'a' %}
Expand Down

0 comments on commit e6656d6

Please sign in to comment.