bbc/bbc-a11y

Title attributes error only allows for titles on inputs - shown as error

nicholasgriffintn opened this issue · 3 comments

Summary

The BBC A1ly test has a rule that disallows the use of title attributes on anything other than inputs, however, in some use cases a title attribute can be useful for images in order to provide the user with context on what that image is for, particularly when it comes to icons, where you may want to tell the user that this icon is for iOS for example.

This rule means that if you have this use case bbc-a1ly will fail, and I'm not quite sure what the reasoning behind this to be an error is exactly.

I see the reason for this is because titles are not supported well on mobile, however, this is more of a warning surely and up to the app to decide how well something in supported? https://www.bbc.co.uk/accessibility/forproducts/guides/mobile/tooltips-and-supplementary-information

I understand the work around would be to implement something with JS and CSS on hover, but these options would be less accessible for those who don't have JS.

And this information is not present in the HTML guides: https://www.bbc.co.uk/accessibility/forproducts/guides/html/title-attributes/

Expected Behaviour

The ruleset for title attributes should allow for this use case or a way of overwriting this ruleset if there isn't already one?

Current Behaviour

The test fails for this use case

Possible Solution

Allow for titles on more elements, or allow this to be overridden on a per app basis.

Context & Motivation

This is failing on our test runs as we have this use case for icons within our application.

Your Environment

NA

Thanks for raising @nicholasgriffintn :)

You can skip certain rules or certain parts of your markup if you want - see Skipping Standards Checks in the readme.

On this particular scenario though - @JamieKnightBBC - do you have any more info on why this rule is in place?

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

This issue was closed because it has been stalled for 5 days with no activity.