Skip to content

Commit

Permalink
Fix primefaces#5270: Inputnumber clarity on id vs inputId.
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Nov 10, 2023
1 parent 92607ee commit 3b8d823
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions components/doc/inputnumber/accessibilitydoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { DocSectionText } from '../common/docsectiontext';
export function AccessibilityDoc() {
const code = {
basic: `
<label htmlFor="price">Price</label>
<InputNumber inputId="price" />
<label htmlFor="input-price">Price</label>
<InputNumber id="span-price" inputId="input-price" />
<span id="label_number">Number</span>
<InputNumber aria-labelledby="label_number" />
Expand All @@ -21,7 +21,8 @@ export function AccessibilityDoc() {
<h3>Screen Reader</h3>
<p>
Value to describe the component can either be provided via <i>label</i> tag combined with <i>inputId</i> prop or using <i>aria-labelledby</i>, <i>aria-label</i> props. The input element uses <i>spinbutton</i> role in addition to
the <i>aria-valuemin</i>, <i>aria-valuemax</i> and <i>aria-valuenow</i> attributes.
the <i>aria-valuemin</i>, <i>aria-valuemax</i> and <i>aria-valuenow</i> attributes. Make sure to assign unique identifiers for the <i>span</i>
and <i>input</i>
</p>

<DocSectionCode code={code} hideToggleCode import hideCodeSandbox hideStackBlitz />
Expand Down

0 comments on commit 3b8d823

Please sign in to comment.