<script src="https://cdn.jsdelivr.net/npm/@heppokofrontend/jquery-accessible-name@0.1.2/dist/jquery.accessibleName.min.js"></script>
npm i @heppokofrontend/jquery-accessible-name
- The
aria-labelledby
attribute - The
aria-label
attribute - The
label
element - The
title
attribute
<labal for="name">Your name</label>
<input id="name" />
$(function() {
const a11yName = $('input').a11yName(); // > Your name
});
https://qiita.com/heppokofrontend/items/7e5d6d69893828cbf17e