Skip to content

Commit

Permalink
fix: disabled buttons focusable
Browse files Browse the repository at this point in the history
  • Loading branch information
BGruenberg committed Dec 18, 2024
1 parent b7ccad7 commit 58bc05f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,8 @@ <h2 class="font-medium text-bold d-inline" data-id="enterDate">
id="suggested-date-description-{{i}}"
data-id="descriptionInput"
class="form-control"
[attr.aria-disabled]="isSuggestedDateFromDatabase(i)"
[tabindex]="isSuggestedDateFromDatabase(i) ? -1 : 0"
[formControlName]="SuggestedDatesFormConstants.FORM_KEY_SUGGESTED_DATE_DESCRIPTION"
placeholder="{{isSuggestedDateFromDatabase(i) ? null : 'home.placeholder' | translate }}"
aria-describedby="description-too-long"
Expand Down
5 changes: 5 additions & 0 deletions src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ input[type="date"] {
text-transform: uppercase;
}

*[aria-disabled="true"] {
opacity: .5;
pointer-events: none;
}

.checkbox input[type="checkbox"] {
display: none;
}
Expand Down

0 comments on commit 58bc05f

Please sign in to comment.