Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WCAG 2.0 - missing attributes. #676

Open
piotrw opened this issue Dec 16, 2014 · 6 comments
Open

WCAG 2.0 - missing attributes. #676

piotrw opened this issue Dec 16, 2014 · 6 comments

Comments

@piotrw
Copy link

piotrw commented Dec 16, 2014

...nt" style="float: left;"></div><button type="button" id="cboxPrevious"></button><button type="button" id="cboxN...

This button element does not have a name available to an accessibility API. Valid names are: title attribute, element content.

http://www.w3.org/TR/WCAG20/#robust
http://www.w3.org/TR/WCAG20-TECHS/H91

@piotrw
Copy link
Author

piotrw commented Dec 16, 2014

<img class="cboxPhoto" src="test.jpg" style="cursor: pointer; width: 500px; height: 713px; float: none;">

Main image element missing an alt attribute also.

http://www.w3.org/TR/WCAG20/#perceivable
http://www.w3.org/TR/WCAG20-TECHS/H37

@piotrw piotrw changed the title WCAG 2.0 - buttons should have title attribute. WCAG 2.0 - missing button and image attributes. Dec 16, 2014
@piotrw piotrw changed the title WCAG 2.0 - missing button and image attributes. WCAG 2.0 - missing attributes. Dec 16, 2014
@mgifford
Copy link

Pretty sure the ones I see in the WAVE toolbar are:

<button style="" id="cboxPrevious" type="button"></button>
<button style="" id="cboxNext" type="button"></button>
<button style="" id="cboxSlideshow"></button>

Would be nice to see that these have proper attributes.

@trussd
Copy link

trussd commented Aug 10, 2016

Does anyone have a patch, hack or instructions for eliminating this accessibility error? I'm in the public sector here, and our site has received a complaint letter. At this point I need to fix these errors, or I have to replace Colorbox altogether. Thanks for any help.

@Kravimir
Copy link

Kravimir commented Aug 10, 2016

The default Colorbox options place text in those button elements. If you are using icons instead, you can specify the aria-label attribute yourself. Here's the configuration I used on a recent project where I used Font Awesome icons for the controls:

var colorboxOpts={
    rel: 'group1',
    close:'<i class="fa fa-close" aria-label="close modal"></i>',
    previous:'<i class="fa fa-chevron-left" aria-label="previous photo"></i>',
    next:'<i class="fa fa-chevron-right" aria-label="next photo"></i>'
};

@lramarojaona
Copy link

This would be a great enhancement, as more and more sites require to be WCAG compliant, especillay in the public sector.

@lkmorlan
Copy link

Duplicate of #765.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants