Fixed #2905 - Improve Deferred Content implementation for Accessibility
parent
cee721b151
commit
f38cbed6ea
|
@ -14,14 +14,14 @@
|
|||
Scroll down to lazy load an image and the DataTable which initiates a query that is not executed on initial page load to speed up load performance.
|
||||
</div>
|
||||
|
||||
<DeferredContent @load="onImageLoad">
|
||||
<!-- <DeferredContent @load="onImageLoad">
|
||||
<img src="demo/images/nature/nature4.jpg" alt="Nature"/>
|
||||
</DeferredContent>
|
||||
</DeferredContent> -->
|
||||
|
||||
<div style="height: 500px">
|
||||
</div>
|
||||
|
||||
<DeferredContent @load="onDataLoad">
|
||||
<DeferredContent @load="onDataLoad" role="region" aria-live="polite" aria-label="Content loaded after page scrolled down">
|
||||
<DataTable :value="products" responsiveLayout="scroll">
|
||||
<Column field="code" header="Code"></Column>
|
||||
<Column field="name" header="Name"></Column>
|
||||
|
|
|
@ -67,6 +67,24 @@ import DeferredContent from 'primevue/deferredcontent';
|
|||
<h5>Styling</h5>
|
||||
<p>Component does not apply any styling.</p>
|
||||
|
||||
<h5>Accessibility</h5>
|
||||
<DevelopmentSection>
|
||||
<h6>Screen Reader</h6>
|
||||
<p>DeferredContent can be utilized in many use cases as a result no role is enforced, in fact a role may not be necessary if the card is used for presentational purposes only.
|
||||
Any valid attribute is passed to the container element so you have full control over the roles like <a href="https://www.w3.org/TR/wai-aria/#landmark" alt="Landmark Roles">landmark</a> and attributes like <i>aria-live</i>.
|
||||
</p>
|
||||
|
||||
<pre v-code><code>
|
||||
<DeferredContent role="region" aria-live="polite" aria-label="Content loaded after page scrolled down">
|
||||
Content
|
||||
</DeferredContent>
|
||||
|
||||
</code></pre>
|
||||
|
||||
<h5>Keyboard Support</h5>
|
||||
<p>Component does not include any interactive elements.</p>
|
||||
</DevelopmentSection>
|
||||
|
||||
<h5>Dependencies</h5>
|
||||
<p>None.</p>
|
||||
</AppDoc>
|
||||
|
|
Loading…
Reference in New Issue