Editoria11y Unit Tests

Developer mode should pick up this h6

Todo:

Short bold lines
with a carriage return can be missed.

I'm a fake heading

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, for example, is really quite awfully long and should be much shorter.

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

Uses chart but not too bad.

Chart showing the ten-year rolling averages for Princeton's endowment returns from fiscal year 1991 (14.5 percent) to fiscal year 2025 (9 percent).

Figures

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

Contrast

Super legible.

And incalculable.

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

Only pseudo-content

Click here for 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

Alert for opens-in test.

A link in a new 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.

An ArXiv link.

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.

* not two.

* or three

Spacer between lists.

1 This is split


2 with HR


3 but non-contiguous p are detected.

(1) A parenthesis list

(2) Two

(3) Three

I want an apple.

I want a turtle.

B bear.

A turtle.

11

12

1 thing

20 things

10 things

20 things

1 thing

1 thing

3 thing

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.

Forms

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

Edge Cases & Crash Tests

Shadow root as check root

The shadow-root-as-checkroot element below tests that a checkRoot with a shadowRoot doesn't throw "read-only" TypeError.

Images with unusual alt text

Invisible Unicode braille spaces: ⠀⠀⠀

Only whitespace alt:

Only special characters alt: '"?.-

Alt text is the word null: null

Links with unusual structures

Link containing only an empty span:

Link containing only a BR:

Link with zero-width space only:

Link with empty SVG only:

Link with only an empty icon element:

Headings with unusual content

Tables with unusual structures

Nested table with no headers

Form inputs with edge-case labeling

Buttons with no accessible name

Focusable hidden elements

Headings with unusual role/level

Content with empty aria-level

Embedded content edge cases

SVG edge cases

Empty SVG (should not crash contrast checker):

SVG with only title: SVG Title

Contrast edge cases

Transparent text should not crash

RGBA zero alpha text

Inherited styles

All tips

Potentially troublesome roots