Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

- Add id to numberic stepper input for accessibility purposes

## [9.146.13] - 2024-08-20

## [9.146.12] - 2024-08-20
Expand Down
4 changes: 4 additions & 0 deletions react/components/NumericStepper/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ class NumericStepper extends Component {
label,
lean,
readOnly,
useSemanticHtml,
} = this.props

const isMin = value <= normalizeMin(minValue)
Expand Down Expand Up @@ -285,6 +286,8 @@ class NumericStepper extends Component {
lean ? 'outline-0' : ''
} `

const semanticHtml = useSemanticHtml ? { id: 'vtex-product-quantity-input' } : {}

const content = (
<React.Fragment>
{label && (
Expand All @@ -295,6 +298,7 @@ class NumericStepper extends Component {
)}
<div className="vtex-numeric-stepper-container numeric-stepper-container flex self-start">
<input
{...semanticHtml}
type="tel"
readOnly={readOnly}
className={`vtex-numeric-stepper__input numeric-stepper__input z-1 order-1 tc bw1 ${borderClasses} br0 ${inputClasses} ${styles.hideDecorators}`}
Expand Down