Data header / data-original-header and accessibility attributes

I was looking for information about the data-title and data-original-title attributes. My problem is that Twitter Bootstrap is converting the title attribute to the original data title and I'm not sure if this is what I want. How about screen readers? Do they treat the title of the data as a header or ignore it? If I use one of these data attributes, should I also add the title attribute?

+3


source to share


1 answer


custom attributes aredata-*

defined for HTML5. They are designed to store sensitive data on a page or application.

Spectrum says:

These attributes are not intended to be used by software that is independent of the site using the attributes.



Thus, other tools (such as screen readers) should not use them.

If there is something title

, you shouldn't use an attribute data-*

(for example data-title

) in the first place, as the spec says "[...] for which there are no more appropriate attributes or elements"; use title

.

+1


source







All Articles