I'm putting together a list of pros and cons about making the alt
attribute required in HTML 5. The following is a list of reasons for and against making the alt
attribute required. What is your opinion?
Reasons why the alt
Attribute Should Be Required
- If the image is decorative, it should be provided with CSS. If the image has content, then the
alt
attribute should be used or the content will not be perceivable to some users. - The
alt
attribute should be mandatory in HTML 5 with a note pointing to WCAG 2.0 for guidance, as WAI are the experts in this area. - Not requiring the
alt
attribute allows broad, dangerous ideas of what should and should not have alt. Laziness will dictate. - Authors should be required to make a decision about alt text for every image.
- Without alt text, assistive technologies rely on heuristics to determine the purpose of the image, which often results in gibberish — for example, announcing machine generated file names as the link phrase for links.
- Bad alt text is much better than no alt text.
- Requiring alt text encourages people in the right direction.
- Because people don't always get the alt text correct, it is not a reason not to require it.
- Requiring alt text creates a teachable moment.
- The
alt
attribute should be required with an additional attribute to indicate when it hasn't been provided. - The alt attribute should be required for backward compatibility.
- There has not been a convincing argument for what lack of alt should mean.
Reasons why the alt
Attribute Should Not Be Required
- Making the
alt
attribute required results in people providing nonsense values. - It's not reasonable to expect anyone to provide alt text when uploading several thousand photos all at once.
- Making the
alt
attribute required does not mean it will be used correctly. - Provide the alt text with
aria-labelledby
is better than requiring thealt
attribute. - Providing alt text should be considered best practice, not required.
- Requiring alt text is merely philosophical without context.
- The
alt
attribute should not be required, but flagged at validation as a warning. - There are exceptions where no value is possible.
- There are illustrative images that do not require alt text.
- Images on my website are for my family, and they don't need alt text.
- The
alt
attribute should not required because authors get it wrong, in the same way they get other markup wrong, such as data tables without headings. - All that is required for accessibility is that the
alt
attribute may be used; it should not be required.
What do you Think?
Do you have reasons other than those already stated about whether or not the alt
attribute should be required in HTML 5? If so, either leave a comment here, or contribute to the Twitter discussion or respond to me directly on Twitter. If you respond on Twitter, please use the #althtml5 hashtag so that I can find your response.
Tidak ada komentar:
Posting Komentar