Merged in feat/STAY-140-stepper-accesible (pull request #3432)
feat(STAY-140): make Stepper more accessible * feat(STAY-140): make Stepper more accessible * fix(STAY-140): add aria-valuetext Approved-by: Bianca Widstam
This commit is contained in:
@@ -4,7 +4,7 @@ import { useRef } from "react"
|
||||
import { useFormContext } from "react-hook-form"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import Stepper from "@scandic-hotels/design-system/Stepper"
|
||||
import { Stepper } from "@scandic-hotels/design-system/Stepper"
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
|
||||
import ChildInfoSelector from "./ChildInfoSelector"
|
||||
@@ -61,9 +61,11 @@ export default function ChildSelector({
|
||||
variant="Body/Supporting text (caption)/smBold"
|
||||
className={styles.label}
|
||||
>
|
||||
<p>{childrenLabel}</p>
|
||||
<p id="stepper-children-label">{childrenLabel}</p>
|
||||
</Typography>
|
||||
<Stepper
|
||||
label={childrenLabel}
|
||||
ariaLabelledBy="stepper-children-label"
|
||||
count={currentChildren.length}
|
||||
handleOnDecrease={() => {
|
||||
decreaseChildrenCount(roomIndex)
|
||||
|
||||
Reference in New Issue
Block a user