Merge pull request #2693 from tugcekucukoglu/accessibility-textarea

Accessibility for Textarea
pull/2734/head
Tuğçe Küçükoğlu 2022-06-29 16:10:26 +03:00 committed by GitHub
commit 12c59fc2f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 35 additions and 0 deletions

View File

@ -78,6 +78,41 @@ import Textarea from 'primevue/textarea';
</table>
</div>
<h5>Accessibility</h5>
<DevelopmentSection>
<h6>Screen Reader</h6>
<p>Textarea component renders a native textarea element that implicitly includes any passed prop. Value to describe the component can either be provided via <i>label</i> tag combined with <i>id</i> prop or using <i>aria-labelledby</i>, <i>aria-label</i> props.</p>
<pre v-code><code>
&lt;label for="address1"&gt;Address 1&lt;/label&gt;
&lt;Textarea id="address1" /&gt;
&lt;span id="address2"&gt;Address 2&lt;/span&gt;
&lt;Textarea aria-labelledby="address2" /&gt;
&lt;Textarea aria-label="Address Details"/&gt;
</code></pre>
<h6>Keyboard Support</h6>
<div class="doc-tablewrapper">
<table class="doc-table">
<thead>
<tr>
<th>Key</th>
<th>Function</th>
</tr>
</thead>
<tbody>
<tr>
<td><i>tab</i></td>
<td>Moves focus to the input.</td>
</tr>
</tbody>
</table>
</div>
</DevelopmentSection>
<h5>Dependencies</h5>
<p>None.</p>
</AppDoc>