@@ -17,6 +17,10 @@ <h1>Checka11y.css demo</h1>
1717 < h2 > HTML: html tag should have a lang attribute</ h2 >
1818 < p > See top of page.</ p >
1919 </ section >
20+ < section >
21+ < h2 > Page title: the title tag should not be empty or missing</ h2 >
22+ < p > See top of page.</ p >
23+ </ section >
2024 < section >
2125 < h2 > Images: All images require an alt attribute, whether it has a value or is null</ h2 >
2226 < img src ="../img/checka11y-icon.png " />
@@ -54,9 +58,21 @@ <h2>Images: All images should have a meaningful and descriptive alt attribute.</
5458 < img alt ="image of an image " src ="../img/checka11y-icon.png " />
5559 < img alt ="bullet 1 " src ="../img/checka11y-icon.png " />
5660 </ section >
61+ < section >
62+ < h2 > Images: Should avoid longdesc attribute and it must be an URL.</ h2 >
63+ < img alt ="accessibility icon " src ="./assets/a11y.png " longdesc ="https://test.test " />
64+ < img alt ="accessibility icon " src ="./assets/a11y.png " longdesc ="https://test.jpg " />
65+ < img alt ="accessibility icon " src ="./assets/a11y.png " longdesc ="https://test.png " />
66+ < img alt ="accessibility icon " src ="./assets/a11y.png " longdesc ="https://test.gif " />
67+ < img alt ="accessibility icon " src ="./assets/a11y.png " longdesc ="https://test.avif " />
68+ < img alt ="accessibility icon " src ="./assets/a11y.png " longdesc ="https://test.svg " />
69+ < img alt ="accessibility icon " src ="./assets/a11y.png " longdesc ="This longdesc is invalid because it should be an URL instead of plain text " />
70+ < img alt ="accessibility icon " src ="./assets/a11y.png " longdesc ="" />
71+ </ section >
5772 < section >
5873 < h2 > iframe: iframe has title attribute</ h2 >
5974 < iframe src ="https://checka11y.jackdomleo.dev " height ="500 " width ="500 "> </ iframe >
75+ < iframe src ="https://checka11y.jackdomleo.dev " height ="500 " width ="500 " title ="Test with title "> </ iframe >
6076 </ section >
6177 < section >
6278 < h2 > Lists: All children of <ol> must only be <li>, <template> or <script></ h2 >
@@ -212,7 +228,8 @@ <h3>Buttons: <video> with controls attribute can not be a child of <but
212228 </ section >
213229 < section >
214230 < h2 > Dir attribute: The dir attribute can only have the values, ltr, rtl and auto.</ h2 >
215- < p dir ="lr "> This is an <p> with dir attribute set to lr</ p >
231+ < p dir ="lr "> This is an <p> with dir attribute set to lr (invalid)</ p >
232+ < p dir ="rtl "> This is an <p> with dir attribute set to rtl (valid)</ p >
216233 </ section >
217234 < section >
218235 < h2 > Check the tabindex of commonly tabbed to elements and show an error if it is -1</ h2 >
@@ -258,7 +275,7 @@ <h6></h6>
258275 </ section >
259276 < section >
260277 < h2 > Headings: reachable by assistive technologies</ h2 >
261- < p > Headings should be reachable by assistive technologies (do not use < code > aria-hidden</ code > or similars on a heading). </ code > </ p >
278+ < p > Headings should be reachable by assistive technologies (do not use < code > aria-hidden</ code > or similars on a heading)</ p >
262279 < h1 aria-hidden ="true "> H1 with aria-hidden="true"</ h1 >
263280 < h2 aria-hidden ="true "> H2 with aria-hidden="true"</ h2 >
264281 < h3 aria-hidden ="true "> H3 with aria-hidden="true"</ h3 >
@@ -321,7 +338,7 @@ <h2>Avoid using mouse event handlers without the appropriate keyboard alternativ
321338 < div >
322339 < div onclick =""> A div with onclick</ div >
323340 < div onclick ="" onkeydown =""> A div with onclick and onkeydown</ div >
324- < div onclick ="" onkeydown ="" role ="button "> A div with with onclick, onkeydown and role=button</ div >
341+ < div onclick ="" onkeydown ="" role ="button "> A div with onclick, onkeydown and role=button</ div >
325342 < div onclick ="" onkeydown ="" role ="button " tabindex ="-1 "> A div with onclick, onkeydown, role=button and tabindex=-1</ div >
326343 </ div >
327344 </ section >
@@ -366,5 +383,107 @@ <h2>Elements with aria-hidden should not have focusable descendants.</h2>
366383 < video controls > </ video >
367384 </ div >
368385 </ section >
386+ < section >
387+ < h1 role ="text "> This should not have role=text</ h1 >
388+ < h2 role ="text "> This should not have role=text</ h2 >
389+ < h3 role ="text "> This should not have role=text</ h3 >
390+ < h4 role ="text "> This should not have role=text</ h4 >
391+ < h5 role ="text "> This should not have role=text</ h5 >
392+ < h6 role ="text "> This should not have role=text</ h6 >
393+ </ section >
394+ < section >
395+ < h2 > Anchor tags should not be used as buttons</ h2 >
396+ < a href ="# "> Do something</ a >
397+ < a href ="javascript:void(0) " role ="button "> Do another thing</ a >
398+ < a href ="javascript:doSomething(0) "> Do another thing</ a >
399+ </ section >
400+ < section >
401+ < h2 > A < code > <section></ code > should contain a heading element</ h2 >
402+ < section >
403+ < h2 > This is a heading element.</ h1 >
404+ </ section >
405+ < section > <!-- This is an empty section --> </ section >
406+ < section >
407+ < p > this is not a heading element, just a cool paragraph.</ p >
408+ </ section >
409+ </ section >
410+ < section >
411+ < h2 > A < code > <a></ code > has an < code > href</ code > linking to a PDF, Word, Excel, or PowerPoint document.</ h2 >
412+ < ul >
413+ < li > < a href ="/static/foo.pdf "> .pdf (PDF)</ a > </ li >
414+ < li > < a href ="/static/foo.docx "> .docx (Word)</ a > </ li >
415+ < li > < a href ="/static/foo.doc "> .doc (Word)</ a > </ li >
416+ < li > < a href ="/static/foo.xls "> .xls (Excel)</ a > </ li >
417+ < li > < a href ="/static/foo.xlsx "> .xlsx (Excel)</ a > </ li >
418+ < li > < a href ="/static/foo.pptx "> .pptx (PowerPoint)</ a > </ li >
419+ < li > < a href ="/static/foo.pptm "> .pptm (PowerPoint)</ a > </ li >
420+ < li > < a href ="/static/foo.ppt "> .ppt (PowerPoint)</ a > </ li >
421+ < li > < a href ="/static/foo.txt "> .txt (Text)</ a > </ li >
422+ </ ul >
423+ < h2 > A < code > <a></ code > has an < code > href</ code > linking to a content site (Youtube, etc)</ h2 >
424+ < ul >
425+ < li > < a href ="https://youtube.com/foo "> YouTube Link</ a > </ li >
426+ < li > < a href ="https://youtu.be/bar "> YouTube Link</ a > </ li >
427+ < li > < a href ="https://spotify.com/en/ "> Spotify Link</ a > </ li >
428+ </ ul >
429+ </ section >
430+ < section id ='interactive-elements '>
431+ < h2 > Interactive Elements: not reachable by assistive technologies</ h2 >
432+ < p > Interactive Elements should be reachable by assistive technologies (do not use < code > aria-hidden</ code > on a Interactive Elements.) </ p >
433+ < a aria-hidden ="true " href ='https://github.com/jackdomleo7/Checka11y.css '> Anchor for Interactive purposes</ a >
434+ < map name ="workmap " aria-hidden ="true ">
435+ < area shape ="rect " coords ="34,44,270,350 " alt ="Clickable area " href ="https://checka11y.jackdomleo.dev "/>
436+ </ map >
437+
438+ < map name ="workmap " >
439+ < area shape ="rect " coords ="34,44,270,350 " alt ="Clickable area " href ="https://checka11y.jackdomleo.dev " aria-hidden ="true "/>
440+ </ map >
441+
442+ < audio aria-hidden ="true " controls > </ audio >
443+
444+ < button aria-hidden ="true "> Button</ button >
445+
446+ < iframe aria-hidden ="true " src ="https://checka11y.jackdomleo.dev " title ="Checka11y.css website "> </ iframe >
447+
448+ < input aria-hidden ="true " type ="text " />
449+
450+ < select aria-hidden ="true "> < option > Option</ option > </ select >
451+
452+ < details > Interactive details element< summary aria-hidden ="true "> Summary</ summary > </ details >
453+
454+ < textarea aria-hidden ="true "> textarea</ textarea >
455+
456+ < video aria-hidden ="true " controls > </ video >
457+
458+ < div aria-hidden ='true ' role ='button '> interactive custom button</ div >
459+ < div role ="link " aria-hidden ="true "> Custom Link</ div >
460+ < div role ="combobox " aria-hidden ="true "> ComboBox</ div >
461+
462+ < ul role ="menu ">
463+ < li role ="menuitem " aria-hidden ="true "> Menu Item 1</ li >
464+ < li role ="menuitem " tabindex ="0 "> Menu Item 2</ li >
465+ </ ul >
466+
467+ < div role ="menuitemcheckbox " aria-hidden ="true "> Menu Checkbox</ div >
468+ < div role ="menuitemradio " aria-hidden ="true "> Menu Radio</ div >
469+ < div role ="option " aria-hidden ="true "> Option</ div >
470+ < div role ="radio " aria-hidden ="true "> Radio Button</ div >
471+ < div role ="scrollbar " aria-hidden ="true "> Scroll Bar</ div >
472+ < div role ="searchbox " aria-hidden ="true "> Search Box</ div >
473+ < div role ="separator " aria-valuenow aria-hidden ="true "> Separator with aria-valuenow</ div >
474+ < div role ="separator " aria-valuemax aria-hidden ="true "> Separator with aria-valuemax</ div >
475+ < div role ="separator " aria-valuemin aria-hidden ="true "> Separator with aria-valuemin</ div >
476+ < div role ="slider " aria-hidden ="true "> Slider</ div >
477+ < div role ="spinbutton " aria-hidden ="true "> Spin Button</ div >
478+ < div role ="switch " aria-hidden ="true "> Switch</ div >
479+
480+ < div role ="tablist ">
481+ < div role ="tab " aria-selected ="true "> Tab 1</ div >
482+ < div role ="tab " aria-hidden ='true '> Tab 2</ div >
483+ </ div >
484+
485+ < div role ="textbox " aria-hidden ="true "> Text Box</ div >
486+ < div role ="treeitem " aria-hidden ="true "> Tree Item</ div >
487+ </ section >
369488 </ body >
370489</ html >
0 commit comments