title tag and aria-label tag
-
Is it possible to add a <title> and <aria-label> for each marker? I tried with jQuery, but it does not work.
We are interested to buy the full version for our client whose website needs WCAG accessibility standard. That’s why we have to add <title> tag and <aria-label>tag for the screen reader to read it out for the visually impaired people.
We appreciate if you could help.We are testing the plugin in our test site:
https://newtest.marvel-solution.com.hk/l-map/
screenshot:
https://paste.pics/FVRC3`This is the jQuery codes I added, but it does not work.
jQuery(document).ready(function( $ ){
/*—–Add aria-label and title for marker—–*/
var b = document.querySelector(‘a[data-location=’Tung-Chung’]’);
var theLanguage = $(‘html’).attr(‘lang’);
// Diferent language
if (theLanguage == “en-US”) {
b.setAttribute(“title”, “Tung Chung”);
b.setAttribute(“aria-label”, “Tung Chung”);} else if
(theLanguage == “zh-hant”) {
b.setAttribute(“title”, “東涌”);
b.setAttribute(“aria-label”, “東涌”);} else {
b.setAttribute(“title”, “东涌”);
b.setAttribute(“aria-label”, “东涌”);
}Thanks & regards,
KFThe page I need help with: [log in to see the link]
- The topic ‘title tag and aria-label tag’ is closed to new replies.