Open geospatialem opened 9 months ago
Installed and assigned for verification.
Reopening for verification
Additional effort is needed to ensure the label
context is provided to AT, currently if the chip
does not have slotted text, no context is provided Instead, it should have similar support to button
:
3.0.0-next.29
: https://codepen.io/geospatialem/pen/mybbzZPbutton
code:
https://github.com/Esri/calcite-design-system/blob/0362b4e661a2b009fd26c2eea1b25f572ce0b5ef/packages/calcite-components/src/components/button/button.tsx#L343Update: this looks to be a result of the "undefined" role.
cc @benelan
Check existing issues
Summary
Chip's
label
property should be provided over thevalue
or slotted text.Actual Behavior
The component's
label
property provides context to AT, wherevalue
is not provided to assistive technologies or when a parentchip-group
is present.Expected Behavior
As part of an upcoming breaking change release, we should consider making
label
required from our discussions in https://github.com/Esri/calcite-design-system/pull/6075#discussion_r1055903130. This way the internals stay the same and label is read to assistive technologies, and required. Value should just be optionally used for getting value in selection mode.If enforcing a required
label
, thevalue
can be optional and not read back to assistive technologies. This seems to be a similar pattern in other components, such asalert
and the parentchip-group
:https://github.com/Esri/calcite-design-system/blob/107792d52159848bd6e01fd14fa80292fbfd02e6/packages/calcite-components/src/components/alert/alert.tsx#L111-L112
https://github.com/Esri/calcite-design-system/blob/107792d52159848bd6e01fd14fa80292fbfd02e6/packages/calcite-components/src/components/chip-group/chip-group.tsx#L46-L47
cc @macandcheese
Reproduction Sample
https://codepen.io/geospatialem/pen/poYKVYv
Reproduction Steps
chip-group
works as-expectedlabel
's are not provided to ATReproduction Version
2.4.0
Working W3C Example/Tutorial
No response
Relevant Info
Regression?
No response
Priority impact
p4 - not time sensitive
Calcite package
Esri team
Calcite (dev)