thexerteproject / xerteonlinetoolkits

Xerte Online Toolkits
www.xerte.org.uk
Apache License 2.0
62 stars 61 forks source link

Accessibility issue that the toolbar doesn't report #1144

Open ronm123 opened 2 years ago

ronm123 commented 2 years ago

Had this reported so documenting here but it's arguably just a weakness in the accessibility button functionality and what it checks/reports against. A couple of examples:

Example 1: If you have some text with a short line above that text that you make bold rather than a heading style e.g. `

Bold text before para

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam fringilla velit urna, ut dapibus orci lacinia non.

Nulla facilisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.

` Then the accessibility button reports an error saying: Paragraphs must not be used for headers Headers are extremely useful for non-sighted users to navigate the structure of the page. Formatting a paragraph to just be big or bold, while it might visually look like a header, does not make it a header. This seems quite good that it pick this up and provides useful guidance. However see next example: Example 2: heading styles applied but not in linear order e.g. `
Heading 5

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam fringilla velit urna, ut dapibus orci lacinia non.

Heading 3

Nulla facilisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.

Heading 4

Praesent sed magna sit amet ante interdum vulputate. Pellentesque vitae lacus ex. Donec bibendum hendrerit pretium. Proin tristique augue mi, eget laoreet lacus fermentum mollis.

` In this case the accessibility button reports that all is ok. It obviously can't detect heading styles outside of each text box but within each text box should it pick up and report on heading styles used in random order? Is this something we should try to extend ourselves?
FayCross commented 2 years ago

@ronm123 I thought this worked as I had done some testing before the release but I've realised that I must have tested for something like this instead: H3 text... H5 text... This gives warning 'Header order should not skip a level. Do not follow a header level 3 with a level 5 or 6.'

We should probably have a think about how headings are added via ckeditor anyway as in Bootstrap you can only add headings H3 onwards but can easily not have any H2 on the page (these will only be there if you have the show title box checked on some of the content within a section ).