Editoria11y Unit Tests

Headings

Outline structure & empty headings.

skipped heading
Skipped heading level

Empty headings

space character (with hidden handler)

empty alt

CMS-provided-placeholder alternative for null alt

This image has an empty alt attribute; its filename is image.jpg

null alt

empty linked heading

Suspiciously long heading. Headings should not be used for emphasis, but rather for a document outline, so if you find yourself talking this much, this probably is being used for visual formatting, not a heading.

Skipped and empty heading (duplicate alert check)

This heading has a blank aria-label, but that should be ignored by config (needed for Gutenberg)

Heading with alt

I am the alt text for this heading

Heading hidden from screen readers

This should be excluded from the outline.

This should not be visible in the page outline

Possible fake headings

Short quote needs check
Longer quotes are OK and should not be flagged.

All <strong> paragraph needs manual check

You can aggregate Posts by a specific category and display the posts in a grid or in a standard list layout. In the example below, we created a Post Category named Announcement and used the Post List Block to list Posts tagged with the Announcement category.

All <b>old paragraph needs manual check

Short lines with spans,  non-breaking whitespace should still be flagged

Short bold line
With a carriage return.

Headings with certain punctuation are assumed to be sentences, and not flagged. (!?)

A bold paragraph of very many characters is probably not a heading and probably shouldn't be flagged even if it does not end in a period

Image Text alternatives

Image with no alt attribute at all

Screen readers end up reading this as a filename.

Image marked as decorative with an empty alt

This might be OK; flagged as needing manual review.

Image with an invalid alt attribute

E.g., alt="'"

'

Image with a filename as an alt

filename.jpg

Image with redundant text in its alt

E.g., “image of.”

             Image of a photo of a turtledove.

Bob photo.

Image with placeholder alt

TBD

TBD

Image with very long alt text

Alt text should be brief. Screen readers cannot jump from sentence to sentence in alt text, so listeners just hear one monster pile of text and if they miss something they have to start over.

This link has text and an image.A lovely gray box

Ignore handling on images

Aria hidden image

Image inside an aria-labelled link.tbd

Aria labelled image

Figures

Figcaption with empty image alt
Figcaption is the same as alt
Figcaption is the same as alt

Embeds

Flagged as manual check needed for captioning:


YouTube

HTML5 video

E.g., a social media feed
[iframe commented out during development]

Also flagged: embedded audio and social media.

No characters

Space character

Image with deadspace: '

Content is image in CSS ::before:

Content is in CSS ::before:

https://www.youtube.com/watch?v=DLzxrzFCyOs

Click here

“Click here,” “learn more,” “download,” etc.

Download But should only be yellow

Click here

More

Link with ignored substring: Click here (opens in new window)

Link with new window icon: You were warned (opens in new window)

A great video

An informative video.

A link in a tab

Link that is only an aria-label:

Link with inner download icon with aria-label: Aria label on inner span ^

An informative video (opens in new window).

Note that you can set what Editoria11y should look for in your preferences file. By default it checks for PDF and DOC files.

A fake PDF link.

A fake PDF link with a different url.

Silent but interactive links

linked image with empty alt.

linked image with no alt.

' Linked image with an unpronounceable (unvoiced characters) alt text.

http://jpg.gif linked image with filename.

click here linked image with click here.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. linked image with giant alt.

Link text with image texta butterfly

Link text with text and empty image text

Links with accessible text added programmatically

These should all pass.

Tables

Tables without valid headers

A table without a TH header is invalid

Outline headers do not count

Disable should be content header test inside tables

Numbers in tables

Should not be checked for lists

1.

2. Turtles

And Peggy

2.

Bears

Empty table header cells

Empty table heading cells will also be flagged:  

Legibility

Lists

a. Fake lists

b. use letters or numbers.

c. rather than real formatting.

1. Fake lists
2. Sometimes use
BR instead of P tags.

* Fake lists

* Should only

* be flagged

* one time.

(a) apple
(b) banana
(c) pear

1 This is split


2 with HR


3 but non-contiguous p are detected.

(1) A parenthesis list

(2) Two

(3) Three

B bear.

A turtle.

Apple

Appeal

Apple

Bear

A Bear

A turtle

Aardvark

Bad

🥑 Fake lists with emoji

🍅 Oh tomato...

🦄 Shiny Unicorn

⊙ Math symbol

⊙ Detect on repeat

🚜 Now emoji again, with a line break
🛵 Any other emoji

11

12

1 thing

20 things

10 things

20 things

1 thing

1 thing

🥑 Fake lists with emoji

🍅 Oh tomato...

🦄 Shiny Unicorn

⊙ Math symbol

⊙ Detect on repeat

🚜 Now emoji again, with a line break
🛵 Any other emoji

1. This has rich text after the BR
2. Fancy.

1. This has nothing after the BR

1.

🍅 Oh tomato...

Caps lock

SEVERAL WORDS IN A ROW OF CAPS LOCK TEXT WILL TRIGGER A MANUAL CHECK WARNING.

Shadow root handling 1

Shadow root handling 2

This shadow component has no elements to find.
This custom component has no shadow root.

JS Recursion handling

ALL CAPS HEADING OUTLINE IN TABLE OUT OF ORDER SHOULD HAVE 3 HITS

Shadow root handling 3

All tips