jQuery.fn.a11yName
Download
Install
If use CDN:
<script src="https://cdn.jsdelivr.net/npm/@heppokofrontend/jquery-accessible-name@0.1.2/dist/jquery.accessibleName.min.js"></script>
If use npm:
npm i @heppokofrontend/jquery-accessible-name
Suppot
- The
aria-labelledby
attribute - The
aria-label
attribute - The
label
element - The
title
attribute
Usage
<labal for="name">Your name</label>
<input id="name" />
$(function() {
const a11yName = $('input').a11yName(); // > Your name
});