gfranko / jquery.selectBoxIt.js

A jQuery Select Box Plugin for Mobile, Tablet, and Desktop
http://www.selectboxit.com
MIT License
852 stars 301 forks source link

How to remove `aria-labelledby` attribute? #389

Open GitHubHubus opened 5 years ago

GitHubHubus commented 5 years ago

Hello. In dropdownContainer automatically put the attribute aria-labelledby. screenshot 1

I saw documentation and didn't find how I can remove this attribute from span container. Is it possible?

nachitox commented 4 years ago
        if(dropdownLabel.length) {

            // MDN `aria-labelledby` description:  Indicates the IDs of the elements that are the labels for the object.
            self.dropdownContainer.attr("aria-labelledby", dropdownLabel[0].id);

        }

I changed it to:

        if(dropdownLabel.length && dropdownLabel[0].id) {

            // MDN `aria-labelledby` description:  Indicates the IDs of the elements that are the labels for the object.
            self.dropdownContainer.attr("aria-labelledby", dropdownLabel[0].id);

        }