mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-12-04 17:24:06 +03:00
Use aria-disabled instead of disabled so that screenreaders will read the checkbox details instead of skipping it
This commit is contained in:
parent
1720df51c4
commit
bdc4a183d1
@ -189,9 +189,12 @@ viewCheckbox :
|
||||
viewCheckbox model =
|
||||
Html.checkbox model.identifier
|
||||
(selectedToMaybe model.selected)
|
||||
[ Events.onCheck (\_ -> onCheck model)
|
||||
, Attributes.id model.identifier
|
||||
, Attributes.disabled model.disabled
|
||||
[ Attributes.id model.identifier
|
||||
, if model.disabled then
|
||||
Widget.disabled True
|
||||
|
||||
else
|
||||
Events.onCheck (\_ -> onCheck model)
|
||||
]
|
||||
|
||||
|
||||
@ -209,7 +212,6 @@ viewEnabledLabel model labelView icon =
|
||||
Html.Styled.label
|
||||
[ Attributes.for model.identifier
|
||||
, Aria.controls model.identifier
|
||||
, Widget.disabled False
|
||||
, Widget.checked (selectedToMaybe model.selected)
|
||||
, labelClass model.selected
|
||||
, css
|
||||
@ -240,7 +242,6 @@ viewDisabledLabel model labelView icon =
|
||||
Html.Styled.label
|
||||
[ Attributes.for model.identifier
|
||||
, Aria.controls model.identifier
|
||||
, Widget.disabled True
|
||||
, Widget.checked (selectedToMaybe model.selected)
|
||||
, labelClass model.selected
|
||||
, css
|
||||
|
Loading…
Reference in New Issue
Block a user