Skip to content

Accessibility specialists

  • About
  • Services
  • Blog
  • Resources
Email us
  1. Home
  2. Resources
  3. Accessible components library
  4. Pagination
  5. Pagination test scenarios

Pages in this section

Components

  • Accordion
  • Breadcrumbs
  • Dialog
  • Disclosure
  • Pagination
    • Accessibility requirements
    • Test scenarios
  • Tabs
  • Text input
  • Textarea

More information

  • Accessibility requirements
  • Compatibility notes
  • Glossary
  • Test steps
  • View the project on GitHub

Pagination test scenarios

These test scenarios are designed to be human readable by using Gherkin syntax. Almost all of them are automated behind the scenes using JavaScript and Playwright, which you can see in the GitHub repo.

Sections: the scenarios are grouped by the same themes as the accessibility requirements in the component documentation, so each section here matches a section there.

Tags: marked by an @ symbol, tags are a way to group related tests. For example, by component name, whether it's an automated or manual test, and the WCAG level and success criterion number.

Steps: every scenario is written with the same shared set of Given, When and Then steps. See the full list of test steps for what each one does.

View accessibility requirements

Adaptability

View accessibility requirements: Adaptability

Tags: @pagination @adaptability

Feature: Pagination — Adaptability

Helping people by honouring user preferences and by allowing adaptations to content presentation and time limits

User story:

As a person who needs to adjust the way content is presented, or to adjust timings, I want components that my tools can interpret and adjust, so that I can navigate, understand, and operate the interface reliably using the technology that supports me.

Background:

Given I load the sample "https://tetralogical.com/resources/accessible-components-library/pagination/examples/default.html"

1.3.4 Orientation

Tags: @1.3.4 @aa @automatic

Rule: 1.3.4 Orientation, Level AA

Scenario: Content is not restricted to a single orientation, unless it's essential

When I switch to landscape mode

And I view the rendered ".tl-pagination"

Then it should not lose any content or functionality

1.4.4 Resize Text

Tags: @1.4.4 @aa @automatic

Rule: 1.4.4 Resize Text, Level AA

Scenario: Text can scale up to 200% without loss of content or functionality

When I zoom in the browser to 200%

And I view the rendered ".tl-pagination"

Then it should not lose any content or functionality

1.4.10 Reflow

Tags: @1.4.10 @aa @automatic

Rule: 1.4.10 Reflow, Level AA

Scenario: Content reflows without horizontal scrolling at 320px wide

When I view the rendered ".tl-pagination"

And I set the viewport to 320px wide

Then it should reflow without requiring horizontal scrolling

1.4.12 Text Spacing

Tags: @1.4.12 @aa @automatic

Rule: 1.4.12 Text Spacing, Level AA

Scenario: Line, letter and word spacing can be increased without a loss of content

When I view the rendered ".tl-pagination"

And I increase the line height to 1.5 times the font size

And I increase the spacing following paragraphs to 2 times the font size

And I increase the letter spacing to 0.12 times the font size

And I increase the word spacing to 0.16 times the font size

Then it should not lose any content or functionality

1.4.8 Visual Presentation

Tags: @1.4.8 @aaa @automatic

Rule: 1.4.8 Visual Presentation, Level AAA

Scenario: People can see their preferences for text colour, width, alignment, spacing, and size reflected in the visual presentation

When I view the rendered ".tl-pagination"

And I apply a custom foreground and background colour using a user stylesheet

And I apply a custom max-width using a user stylesheet

And I apply a custom text-alignment using a user stylesheet

And I apply a custom line height using a user stylesheet

And I apply a custom font size of 200% using a user stylesheet

Then it should not lose any content or functionality

Animation and movement

View accessibility requirements: Animation and movement

Tags: @pagination @animation-and-movement

Feature: Pagination — Animation and movement

Helping people to limit animation or reduce motion within content

No component-specific requirements

Assistive technologies and semantics

View accessibility requirements: Assistive technologies and semantics

Tags: @pagination @assistive-technologies-and-semantics

Feature: Pagination — Assistive technologies and semantics

Helping people who use a screen reader or other assistive tech by using appropriate code

User story:

As a person who uses assistive technology I want components that use semantic markup, roles, and states that my tools can interpret so that I can navigate, understand, and operate the interface reliably.

Background:

Given I load the sample "https://tetralogical.com/resources/accessible-components-library/pagination/examples/default.html"

1.3.1 Info and Relationships

Tags: @1.3.1 @a @automatic

Rule: 1.3.1 Info and Relationships, Level A

Scenario: A navigation landmark is used to identify the pagination component

When I inspect ".tl-pagination" in the DOM

Then it should use the tag "nav"

Tags: @1.3.1 @a @automatic

Rule: 1.3.1 Info and Relationships, Level A

Scenario: The link that visually indicates the current page communicates the state programmatically or as text

When I inspect ".tl-pagination li:nth-child(5) a" in the DOM

Then it should have the attribute "aria-current" with the value "page"

1.3.2 Meaningful Sequence

Tags: @1.3.2 @a @automatic

Rule: 1.3.2 Meaningful Sequence, Level A

Scenario Outline: A correct reading sequence can be programmatically determined

When I inspect "<element>" in the DOM

Then it is positioned after the "<previous_element>" element in the DOM

Examples:

elementprevious_element
.tl-pagination > ol.tl-pagination > a:first-child
.tl-pagination > ol + a.tl-pagination > ol
.tl-pagination li:nth-child(1) a.tl-pagination > ol
.tl-pagination li:nth-child(2) .visually-hidden.tl-pagination li:nth-child(1) a
.tl-pagination li:nth-child(3) a.tl-pagination li:nth-child(2) .visually-hidden
.tl-pagination li:nth-child(4) a.tl-pagination li:nth-child(3) a
.tl-pagination li:nth-child(5) a.tl-pagination li:nth-child(4) a
.tl-pagination li:nth-child(6) a.tl-pagination li:nth-child(5) a
.tl-pagination li:nth-child(7) a.tl-pagination li:nth-child(6) a
.tl-pagination li:nth-child(8) a.tl-pagination li:nth-child(7) a
.tl-pagination li:nth-child(9) .visually-hidden.tl-pagination li:nth-child(8) a
.tl-pagination li:nth-child(10) a.tl-pagination li:nth-child(9) .visually-hidden

2.5.3 Label in Name

Tags: @2.5.3 @a @automatic

Rule: 2.5.3 Label in Name, Level A

Scenario Outline: Each link has an accessible name that matches or includes the visible label

When I inspect "<element>" in the Accessibility Tree

Then it should have an accessible name which contains the visible label "<visible_label>"

Examples:

elementvisible_label
.tl-pagination > a:first-childPrevious
.tl-pagination > ol + aNext
.tl-pagination li:nth-child(1) a1
.tl-pagination li:nth-child(3) a4
.tl-pagination li:nth-child(4) a5
.tl-pagination li:nth-child(5) a6
.tl-pagination li:nth-child(6) a7
.tl-pagination li:nth-child(7) a8
.tl-pagination li:nth-child(8) a9
.tl-pagination li:nth-child(10) a13

4.1.2 Name, Role, Value

Tags: @4.1.2 @a @automatic

Rule: 4.1.2 Name, Role, Value, Level A

Scenario Outline: Each link has an accessible name

When I inspect "<element>" in the Accessibility Tree

Then it should have an accessible name

Examples:

element
.tl-pagination > a:first-child
.tl-pagination > ol + a
.tl-pagination li:nth-child(1) a
.tl-pagination li:nth-child(3) a
.tl-pagination li:nth-child(4) a
.tl-pagination li:nth-child(5) a
.tl-pagination li:nth-child(6) a
.tl-pagination li:nth-child(7) a
.tl-pagination li:nth-child(8) a
.tl-pagination li:nth-child(10) a

Tags: @4.1.2 @a @automatic

Rule: 4.1.2 Name, Role, Value, Level A

Scenario Outline: Each link has a role of link

When I inspect "<element>" in the Accessibility Tree

Then it should have an accessible role of "link"

Examples:

element
.tl-pagination > a:first-child
.tl-pagination > ol + a
.tl-pagination li:nth-child(1) a
.tl-pagination li:nth-child(3) a
.tl-pagination li:nth-child(4) a
.tl-pagination li:nth-child(5) a
.tl-pagination li:nth-child(6) a
.tl-pagination li:nth-child(7) a
.tl-pagination li:nth-child(8) a
.tl-pagination li:nth-child(10) a

Tags: @4.1.2 @a @automatic

Rule: 4.1.2 Name, Role, Value, Level A

Scenario: The link which indicates the current page has a value of aria-current="page"

When I inspect ".tl-pagination li:nth-child(5) a" in the DOM

Then it should have the attribute "aria-current" with the value "page"

Recommendations

Tags: @recommendation @automatic

Rule: Recommendation

Scenario: Markup can be parsed without errors

When I inspect ".tl-pagination" in the DOM

Then it should use valid HTML with no parsing errors

Tags: @recommendation @automatic

Rule: Recommendation

Scenario: The navigation landmark has a descriptive accessible name, such as "Pagination"

When I inspect ".tl-pagination" in the Accessibility Tree

Then its accessible name should be "Pagination"

Tags: @recommendation @automatic

Rule: Recommendation

Scenario Outline: Each link is implemented as an <a> element with a href attribute

When I inspect "<element>" in the DOM

Then it should use the tag "a"

And it should have the attribute "href"

Examples:

element
.tl-pagination > a:first-child
.tl-pagination > ol + a
.tl-pagination li:nth-child(1) a
.tl-pagination li:nth-child(3) a
.tl-pagination li:nth-child(4) a
.tl-pagination li:nth-child(5) a
.tl-pagination li:nth-child(6) a
.tl-pagination li:nth-child(7) a
.tl-pagination li:nth-child(8) a
.tl-pagination li:nth-child(10) a

Tags: @recommendation @automatic

Rule: Recommendation

Scenario: An <ol> is used with role="list" to ensure it is exposed as lists in Safari/VoiceOver

When I inspect ".tl-pagination > ol" in the DOM

Then it should have the attribute "role" with the value "list"

Colour and contrast

View accessibility requirements: Colour and contrast

Tags: @pagination @colour-and-contrast

Feature: Pagination — Colour and contrast

Helping people who struggle with colour perception or low vision

User story:

As a person with low vision or colour vision deficiency I want components with sufficient contrast and that don't rely solely on colour so that I can perceive and understand all content and interface elements.

Background:

Given I load the sample "https://tetralogical.com/resources/accessible-components-library/pagination/examples/default.html"

1.4.1 Use of Color

Tags: @1.4.1 @a @automatic

Rule: 1.4.1 Use of Color, Level A

Scenario: The current page is distinguishable from the other pages without relying on colour alone

When I view the rendered ".tl-pagination a[aria-current='page']"

Then it should be distinguishable from ".tl-pagination li:nth-child(4) a" without relying on colour alone

Scenario Outline: Colour is not the only visual means of conveying information

When I view the rendered "<element>"

Then it should have the CSS property "text-decoration-line" with the value "underline"

Examples:

element
.tl-pagination > a:first-child
.tl-pagination > ol + a
.tl-pagination li:nth-child(1) a
.tl-pagination li:nth-child(3) a
.tl-pagination li:nth-child(4) a
.tl-pagination li:nth-child(5) a
.tl-pagination li:nth-child(6) a
.tl-pagination li:nth-child(7) a
.tl-pagination li:nth-child(8) a
.tl-pagination li:nth-child(10) a

1.4.3 Contrast (Minimum)

Tags: @1.4.3 @aa @automatic

Rule: 1.4.3 Contrast (Minimum), Level AA

Scenario Outline: The text for each link has a contrast ratio of at least 4.5:1 against the background colour

When I view the rendered "<element>"

Then its text should have a contrast ratio of "4.5" against its background

Examples:

element
.tl-pagination > a:first-child
.tl-pagination > ol + a
.tl-pagination li:nth-child(1) a
.tl-pagination li:nth-child(3) a
.tl-pagination li:nth-child(4) a
.tl-pagination li:nth-child(5) a
.tl-pagination li:nth-child(6) a
.tl-pagination li:nth-child(7) a
.tl-pagination li:nth-child(8) a
.tl-pagination li:nth-child(10) a

Tags: @1.4.3 @aa @automatic @darkmode

Rule: 1.4.3 Contrast (Minimum), Level AA

Scenario Outline: Darkmode: The text for each link has a contrast ratio of at least 4.5:1 against the background colour

When I view the rendered "<element>"

And I enable "dark" mode

Then its text should have a contrast ratio of "4.5" against its background

Examples:

element
.tl-pagination > a:first-child
.tl-pagination > ol + a
.tl-pagination li:nth-child(1) a
.tl-pagination li:nth-child(5) a
.tl-pagination li:nth-child(10) a

1.4.11 Non-text Contrast

Tags: @1.4.11 @aa @automatic

Rule: 1.4.11 Non-text Contrast, Level AA

Scenario Outline: Icons used such as arrows for "previous" and "next" have a contrast ratio of at least 3:1 against the background colour

When I view the rendered "<element>"

Then its text should have a contrast ratio of "3" against its background

Examples:

element
.tl-pagination > a:first-child
.tl-pagination > ol + a

Tags: @1.4.11 @aa @automatic

Rule: 1.4.11 Non-text Contrast, Level AA

Scenario Outline: If the links have a custom focus style that uses colour alone, the focus style has a contrast ratio of at least 3:1 against the background colour

When I focus "<element>" using a keyboard

Then it should have a visible focus indicator

And the focus indicator should have a contrast ratio of 3:1 against its background

Examples:

element
.tl-pagination > a:first-child
.tl-pagination > ol + a
.tl-pagination li:nth-child(1) a
.tl-pagination li:nth-child(3) a
.tl-pagination li:nth-child(4) a
.tl-pagination li:nth-child(5) a
.tl-pagination li:nth-child(6) a
.tl-pagination li:nth-child(7) a
.tl-pagination li:nth-child(8) a
.tl-pagination li:nth-child(10) a

1.4.6 Contrast (Enhanced)

Tags: @1.4.6 @aaa @automatic

Rule: 1.4.6 Contrast (Enhanced), Level AAA

Scenario Outline: The text for each link has a contrast ratio of at least 7:1 against the background colour

When I view the rendered "<element>"

Then its text should have a contrast ratio of "7" against its background

Examples:

element
.tl-pagination > a:first-child
.tl-pagination > ol + a
.tl-pagination li:nth-child(1) a
.tl-pagination li:nth-child(3) a
.tl-pagination li:nth-child(4) a
.tl-pagination li:nth-child(5) a
.tl-pagination li:nth-child(6) a
.tl-pagination li:nth-child(7) a
.tl-pagination li:nth-child(8) a
.tl-pagination li:nth-child(10) a

Tags: @1.4.6 @aaa @automatic @darkmode

Rule: 1.4.6 Contrast (Enhanced), Level AAA

Scenario Outline: Darkmode: The text for each link has a contrast ratio of at least 7:1 against the background colour

When I view the rendered "<element>"

And I enable "dark" mode

Then its text should have a contrast ratio of "7" against its background

Examples:

element
.tl-pagination > a:first-child
.tl-pagination > ol + a
.tl-pagination li:nth-child(1) a
.tl-pagination li:nth-child(5) a
.tl-pagination li:nth-child(10) a

Recommendations

Tags: @recommendation @automatic

Rule: Recommendation

Scenario: The visual design remains usable in Windows High Contrast/Forced Colors mode

When I enable "forced colors" mode

And I view the rendered ".tl-pagination"

Then it should not lose any content or functionality

Consistency and predictability

View accessibility requirements: Consistency and predictability

Tags: @pagination @consistency-and-predictability

Feature: Pagination — Consistency and predictability

Helping people by keeping functionality and content consistent and predictable

User story:

As a person who benefits from consistent and predictable interfaces I want components that behave in expected ways and don't cause unexpected changes so that I can navigate and interact with confidence.

Background:

Given I load the sample "https://tetralogical.com/resources/accessible-components-library/pagination/examples/default.html"

3.2.1 On Focus

Tags: @3.2.1 @a @automatic

Rule: 3.2.1 On Focus, Level A

Scenario Outline: Each link does not result in a change of context when focused

When I focus "<element>" using a keyboard

Then it should NOT navigate to a new page

Examples:

element
.tl-pagination > a:first-child
.tl-pagination > ol + a
.tl-pagination li:nth-child(1) a
.tl-pagination li:nth-child(3) a
.tl-pagination li:nth-child(4) a
.tl-pagination li:nth-child(5) a
.tl-pagination li:nth-child(6) a
.tl-pagination li:nth-child(7) a
.tl-pagination li:nth-child(8) a
.tl-pagination li:nth-child(10) a

3.2.3 Consistent Navigation

Tags: @3.2.3 @aa @automatic

Rule: 3.2.3 Consistent Navigation, Level AA

Scenario Outline: Each link has the same accessible name on different pages

Given I load the sample "<sample>"

When I inspect "<element>" in the Accessibility Tree

Then its accessible name should be "<name>"

Examples:

elementnamesample
.tl-pagination > a:first-childPrevious pagehttp://localhost:8081/pagination/examples/default
.tl-pagination > a:first-childPrevious pagehttp://localhost:8081/pagination/examples/default?page=7
.tl-pagination > ol + aNext pagehttp://localhost:8081/pagination/examples/default
.tl-pagination > ol + aNext pagehttp://localhost:8081/pagination/examples/default?page=7
.tl-pagination li:first-child a1http://localhost:8081/pagination/examples/default
.tl-pagination li:first-child a1http://localhost:8081/pagination/examples/default?page=7
.tl-pagination li:last-child a13http://localhost:8081/pagination/examples/default
.tl-pagination li:last-child a13http://localhost:8081/pagination/examples/default?page=7

Recommendations

Tags: @recommendation @automatic

Rule: Recommendation

Scenario Outline: Each link has a visual style that makes it look like a link, such as an underline or background colour

When I view the rendered "<element>"

Then it should have the CSS property "text-decoration-line" with the value "underline"

Examples:

element
.tl-pagination > a:first-child
.tl-pagination > ol + a
.tl-pagination li:nth-child(1) a
.tl-pagination li:nth-child(3) a
.tl-pagination li:nth-child(4) a
.tl-pagination li:nth-child(5) a
.tl-pagination li:nth-child(6) a
.tl-pagination li:nth-child(7) a
.tl-pagination li:nth-child(8) a
.tl-pagination li:nth-child(10) a

Tags: @recommendation @automatic

Rule: Recommendation

Scenario: There is a visual cue for the current link

When I inspect ".tl-pagination li:nth-child(5) a" in the DOM

Then it should have the CSS property "background-color" with the value "rgb(66, 0, 101)"

And it should have the CSS property "color" with the value "rgb(255, 255, 255)"

And it should have the CSS property "font-weight" with the value "700"

Images and media

View accessibility requirements: Images and media

Tags: @pagination @images-and-media

Feature: Pagination — Images and media

Helping people to access (and remove distractions caused by) image, video and audio content

User story:

As a person who cannot see or hear media content I want appropriate text alternatives and captions for images, video and audio so that I can access the same information as everyone else.

Background:

Given I load the sample "https://tetralogical.com/resources/accessible-components-library/pagination/examples/default.html"

1.1.1 Non-text Content

Tags: @1.1.1 @a @automatic

Rule: 1.1.1 Non-text Content, Level A

Scenario Outline: Arrows in "Next" and "Previous" links are hidden from screen readers

When I inspect "<element>" in the Accessibility Tree

Then its accessible name should be "<name>"

Examples:

elementname
.tl-pagination > a:first-childPrevious page
.tl-pagination > ol + aNext page

Tags: @1.1.1 @a @automatic

Rule: 1.1.1 Non-text Content, Level A

Scenario Outline: Each ellipsis character is hidden from screen readers, and visually hidden text alongside it reads "Ellipsis"

Given I load the sample "<sample>"

When I inspect "<item> span[aria-hidden]" in the DOM

Then it should have the attribute "aria-hidden" with the value "true"

When I inspect "<item> .visually-hidden" in the DOM

Then it should contain the text "Ellipsis"

Examples:

sampleitem
http://localhost:8081/pagination/examples/default.tl-pagination li:nth-child(2)
http://localhost:8081/pagination/examples/default.tl-pagination li:nth-child(9)
http://localhost:8081/pagination/examples/default?page=1.tl-pagination li:nth-child(9)
http://localhost:8081/pagination/examples/default?page=13.tl-pagination li:nth-child(2)

1.4.5 Images of Text

Tags: @1.4.5 @aa @automatic

Rule: 1.4.5 Images of Text, Level AA

Scenario Outline: Real text is used instead of images for links where possible

When I inspect "<element>" in the Accessibility Tree

Then it should contain static text, not an image

Examples:

element
.tl-pagination > a:first-child
.tl-pagination > ol + a
.tl-pagination li:nth-child(1) a
.tl-pagination li:nth-child(3) a
.tl-pagination li:nth-child(4) a
.tl-pagination li:nth-child(5) a
.tl-pagination li:nth-child(6) a
.tl-pagination li:nth-child(7) a
.tl-pagination li:nth-child(8) a
.tl-pagination li:nth-child(10) a

1.4.9 Images of Text (No Exception)

Tags: @1.4.9 @aaa @automatic

Rule: 1.4.9 Images of Text (No Exception), Level AAA

Scenario Outline: No images of text at all

When I inspect "<element>" in the Accessibility Tree

Then it should contain static text, not an image

Examples:

element
.tl-pagination > a:first-child
.tl-pagination > ol + a
.tl-pagination li:nth-child(1) a
.tl-pagination li:nth-child(3) a
.tl-pagination li:nth-child(4) a
.tl-pagination li:nth-child(5) a
.tl-pagination li:nth-child(6) a
.tl-pagination li:nth-child(7) a
.tl-pagination li:nth-child(8) a
.tl-pagination li:nth-child(10) a

Input assistance

View accessibility requirements: Input assistance

Tags: @pagination @input-assistance

Feature: Pagination — Input assistance

Helping people to complete forms, enter data and pass authentication

No component-specific requirements

Keyboard

View accessibility requirements: Keyboard

Tags: @pagination @keyboard

Feature: Pagination — Keyboard

Helping people who use a keyboard

User story:

As a keyboard user I want components that follow a logical tab order and provide visible, predictable focus states so that I can move through the interface efficiently and operate every feature without using a mouse.

Background:

Given I load the sample "https://tetralogical.com/resources/accessible-components-library/pagination/examples/default.html"

2.1.1 Keyboard

Tags: @2.1.1 @a @automatic

Rule: 2.1.1 Keyboard, Level A

Scenario Outline: Each link is focusable using the "Tab" key

When I focus "<element>" using a keyboard

Then "<element>" should be focused

Examples:

element
.tl-pagination > a:first-child
.tl-pagination > ol + a
.tl-pagination li:nth-child(1) a
.tl-pagination li:nth-child(3) a
.tl-pagination li:nth-child(4) a
.tl-pagination li:nth-child(5) a
.tl-pagination li:nth-child(6) a
.tl-pagination li:nth-child(7) a
.tl-pagination li:nth-child(8) a
.tl-pagination li:nth-child(10) a

Tags: @2.1.1 @a @automatic

Rule: 2.1.1 Keyboard, Level A

Scenario Outline: Each link can be activated by pressing the "Enter" key

When I focus "<element>"

And I press the "Enter" key once

Then the URL should change

Examples:

element
.tl-pagination > a:first-child
.tl-pagination > ol + a
.tl-pagination li:nth-child(1) a
.tl-pagination li:nth-child(3) a
.tl-pagination li:nth-child(4) a
.tl-pagination li:nth-child(5) a
.tl-pagination li:nth-child(6) a
.tl-pagination li:nth-child(7) a
.tl-pagination li:nth-child(8) a
.tl-pagination li:nth-child(10) a

2.1.2 No Keyboard Trap

Tags: @2.1.2 @a @automatic

Rule: 2.1.2 No Keyboard Trap, Level A

Scenario Outline: Each link does not trap focus going forwards

When I focus "<element>"

And I press the "TAB" key once

Then the focus should not be on a "<element>" element

Examples:

element
.tl-pagination > a:first-child
.tl-pagination > ol + a
.tl-pagination li:nth-child(1) a
.tl-pagination li:nth-child(3) a
.tl-pagination li:nth-child(4) a
.tl-pagination li:nth-child(5) a
.tl-pagination li:nth-child(6) a
.tl-pagination li:nth-child(7) a
.tl-pagination li:nth-child(8) a
.tl-pagination li:nth-child(10) a

Tags: @2.1.2 @a @automatic

Rule: 2.1.2 No Keyboard Trap, Level A

Scenario Outline: Each link does not trap focus going backwards

When I focus "<element>"

And I hold the "SHIFT" key

And I press the "TAB" key once

Then the focus should not be on a "<element>" element

Examples:

element
.tl-pagination > a:first-child
.tl-pagination > ol + a
.tl-pagination li:nth-child(1) a
.tl-pagination li:nth-child(3) a
.tl-pagination li:nth-child(4) a
.tl-pagination li:nth-child(5) a
.tl-pagination li:nth-child(6) a
.tl-pagination li:nth-child(7) a
.tl-pagination li:nth-child(8) a
.tl-pagination li:nth-child(10) a

2.4.3 Focus Order

Tags: @2.4.3 @a @automatic

Rule: 2.4.3 Focus Order, Level A

Scenario Outline: Each link receives focus in logical order

When I focus "<element>"

And I press the "TAB" key once

Then "<next_element>" should be focused

Examples:

elementnext_element
.tl-pagination > a:first-child.tl-pagination li:nth-child(1) a
.tl-pagination li:nth-child(1) a.tl-pagination li:nth-child(3) a
.tl-pagination li:nth-child(3) a.tl-pagination li:nth-child(4) a
.tl-pagination li:nth-child(4) a.tl-pagination li:nth-child(5) a
.tl-pagination li:nth-child(5) a.tl-pagination li:nth-child(6) a
.tl-pagination li:nth-child(6) a.tl-pagination li:nth-child(7) a
.tl-pagination li:nth-child(7) a.tl-pagination li:nth-child(8) a
.tl-pagination li:nth-child(8) a.tl-pagination li:nth-child(10) a
.tl-pagination li:nth-child(10) a.tl-pagination > ol + a

2.4.7 Focus Visible

Tags: @2.4.7 @aa @automatic

Rule: 2.4.7 Focus Visible, Level AA

Scenario Outline: Each link has a focus indicator when it receives keyboard focus

When I focus "<element>" using a keyboard

Then it should have a visible focus indicator

Examples:

element
.tl-pagination > a:first-child
.tl-pagination > ol + a
.tl-pagination li:nth-child(1) a
.tl-pagination li:nth-child(3) a
.tl-pagination li:nth-child(4) a
.tl-pagination li:nth-child(5) a
.tl-pagination li:nth-child(6) a
.tl-pagination li:nth-child(7) a
.tl-pagination li:nth-child(8) a
.tl-pagination li:nth-child(10) a

2.4.11 Focus Not Obscured (Minimum)

Tags: @2.4.11 @aa @automatic

Rule: 2.4.11 Focus Not Obscured (Minimum), Level AA

Scenario Outline: Each link has a focus indicator which is not fully hidden by other content when it receives keyboard focus

When I focus "<element>" using a keyboard

Then it should have a visible focus indicator

And its focus indicator should be at least partially visible

Examples:

element
.tl-pagination > a:first-child
.tl-pagination > ol + a
.tl-pagination li:nth-child(1) a
.tl-pagination li:nth-child(3) a
.tl-pagination li:nth-child(4) a
.tl-pagination li:nth-child(5) a
.tl-pagination li:nth-child(6) a
.tl-pagination li:nth-child(7) a
.tl-pagination li:nth-child(8) a
.tl-pagination li:nth-child(10) a

2.1.3 Keyboard (No Exception)

Tags: @2.1.3 @aaa @automatic

Rule: 2.1.3 Keyboard (No Exception), Level AAA

Scenario Outline: Each link is focusable using the "Tab" key

When I focus "<element>" using a keyboard

Then "<element>" should be focused

Examples:

element
.tl-pagination > a:first-child
.tl-pagination > ol + a
.tl-pagination li:nth-child(1) a
.tl-pagination li:nth-child(3) a
.tl-pagination li:nth-child(4) a
.tl-pagination li:nth-child(5) a
.tl-pagination li:nth-child(6) a
.tl-pagination li:nth-child(7) a
.tl-pagination li:nth-child(8) a
.tl-pagination li:nth-child(10) a

Tags: @2.1.3 @aaa @automatic

Rule: 2.1.3 Keyboard (No Exception), Level AAA

Scenario Outline: Each link can be activated by pressing the "Enter" key

When I focus "<element>"

And I press the "Enter" key once

Then the URL should change

Examples:

element
.tl-pagination > a:first-child
.tl-pagination > ol + a
.tl-pagination li:nth-child(1) a
.tl-pagination li:nth-child(3) a
.tl-pagination li:nth-child(4) a
.tl-pagination li:nth-child(5) a
.tl-pagination li:nth-child(6) a
.tl-pagination li:nth-child(7) a
.tl-pagination li:nth-child(8) a
.tl-pagination li:nth-child(10) a

2.4.12 Focus Not Obscured (Enhanced)

Tags: @2.4.12 @aaa @automatic

Rule: 2.4.12 Focus Not Obscured (Enhanced), Level AAA

Scenario Outline: Each link has a focus indicator which is not even partially hidden by other content

When I focus "<element>" using a keyboard

Then it should have a visible focus indicator

And its focus indicator should be fully visible

Examples:

element
.tl-pagination > a:first-child
.tl-pagination > ol + a
.tl-pagination li:nth-child(1) a
.tl-pagination li:nth-child(3) a
.tl-pagination li:nth-child(4) a
.tl-pagination li:nth-child(5) a
.tl-pagination li:nth-child(6) a
.tl-pagination li:nth-child(7) a
.tl-pagination li:nth-child(8) a
.tl-pagination li:nth-child(10) a

2.4.13 Focus Appearance

Tags: @2.4.13 @aaa @automatic

Rule: 2.4.13 Focus Appearance, Level AAA

Scenario Outline: The focus indicator is at least 2px larger than the component boundary and has a contrast ratio of 3:1 or higher

When I focus "<element>" using a keyboard

Then it should have a visible focus indicator

And the focus indicator should have a contrast ratio of 3:1 against its background

And its focus indicator should have a minimum perimiter thickness of 2px

Examples:

element
.tl-pagination > a:first-child
.tl-pagination > ol + a
.tl-pagination li:nth-child(1) a
.tl-pagination li:nth-child(3) a
.tl-pagination li:nth-child(4) a
.tl-pagination li:nth-child(5) a
.tl-pagination li:nth-child(6) a
.tl-pagination li:nth-child(7) a
.tl-pagination li:nth-child(8) a
.tl-pagination li:nth-child(10) a

Navigation

View accessibility requirements: Navigation

Tags: @pagination @navigation

Feature: Pagination — Navigation

Helping people find the content they are looking for on a single page or across multiple pages

User story:

As a person navigating a website I want clear link purposes, headings, and multiple ways to find content so that I can efficiently locate the information I need.

Background:

Given I load the sample "https://tetralogical.com/resources/accessible-components-library/pagination/examples/default.html"

2.4.4 Link Purpose (In Context)

Tags: @2.4.4 @a @manual

Rule: 2.4.4 Link Purpose (In Context), Level A

Scenario Outline: The purpose of each link is clear from the link text, or the link text and its surrounding context

When I view the rendered "<element>"

Then it should be easy to understand the purpose of each link from its text and surrounding context

Examples:

element
.tl-pagination > a:first-child
.tl-pagination > ol + a
.tl-pagination li:nth-child(1) a
.tl-pagination li:nth-child(3) a
.tl-pagination li:nth-child(4) a
.tl-pagination li:nth-child(5) a
.tl-pagination li:nth-child(6) a
.tl-pagination li:nth-child(7) a
.tl-pagination li:nth-child(8) a
.tl-pagination li:nth-child(10) a

2.4.9 Link Purpose (Link Only)

Tags: @2.4.9 @aaa @manual

Rule: 2.4.9 Link Purpose (Link Only), Level AAA

Scenario Outline: The purpose of each link is clear from the link text alone

When I view the rendered "<element>"

Then it should be easy to understand the purpose of each link from its text alone

Examples:

element
.tl-pagination > a:first-child
.tl-pagination > ol + a
.tl-pagination li:nth-child(1) a
.tl-pagination li:nth-child(3) a
.tl-pagination li:nth-child(4) a
.tl-pagination li:nth-child(5) a
.tl-pagination li:nth-child(6) a
.tl-pagination li:nth-child(7) a
.tl-pagination li:nth-child(8) a
.tl-pagination li:nth-child(10) a

Recommendations

Tags: @recommendation @automatic

Rule: Recommendation

Scenario Outline: The "Previous" and "Next" links include the term "page" in their accessible name

When I inspect "<element>" in the Accessibility Tree

Then its accessible name should be "<name>"

Examples:

elementname
.tl-pagination > a:first-childPrevious page
.tl-pagination > ol + aNext page

Tags: @recommendation @automatic

Rule: Recommendation

Scenario: The Previous link is not rendered on the first page

Given I load the sample "https://tetralogical.com/resources/accessible-components-library/pagination/examples/default?page=1.html"

When I inspect ".tl-pagination > a" in the Accessibility Tree

Then its accessible name should be "Next page"

Tags: @recommendation @automatic

Rule: Recommendation

Scenario: The Next link is not rendered on the last page

Given I load the sample "https://tetralogical.com/resources/accessible-components-library/pagination/examples/default?page=13.html"

When I inspect ".tl-pagination > a" in the Accessibility Tree

Then its accessible name should be "Previous page"

Pointer and touch

View accessibility requirements: Pointer and touch

Tags: @pagination @pointer-and-touch

Feature: Pagination — Pointer and touch

Helping people who use a mouse, touch screen, or other pointing device

User story:

As a person using touch or pointer input I want components with accessible gestures, adequate target sizes, and predictable interactions so that I can accurately interact with all functionality.

Background:

Given I load the sample "https://tetralogical.com/resources/accessible-components-library/pagination/examples/default.html"

2.5.2 Pointer Cancellation

Tags: @2.5.2 @a @automatic

Rule: 2.5.2 Pointer Cancellation, Level A

Scenario Outline: Each link is activated on the "up" event, not on the "down" event

When I press the mouse down on "<element>"

Then it should NOT navigate to a new page

Examples:

element
.tl-pagination > a:first-child
.tl-pagination > ol + a
.tl-pagination li:nth-child(1) a
.tl-pagination li:nth-child(3) a
.tl-pagination li:nth-child(4) a
.tl-pagination li:nth-child(5) a
.tl-pagination li:nth-child(6) a
.tl-pagination li:nth-child(7) a
.tl-pagination li:nth-child(8) a
.tl-pagination li:nth-child(10) a

2.5.8 Target Size (Minimum)

Tags: @2.5.8 @aa @automatic

Rule: 2.5.8 Target Size (Minimum), Level AA

Scenario Outline: Each link has a target area size and spacing of at least 24 by 24 pixels

When I view the rendered "<element>"

Then it should have a width and height of at least 24px

Examples:

element
.tl-pagination > a:first-child
.tl-pagination > ol + a
.tl-pagination li:nth-child(1) a
.tl-pagination li:nth-child(3) a
.tl-pagination li:nth-child(4) a
.tl-pagination li:nth-child(5) a
.tl-pagination li:nth-child(6) a
.tl-pagination li:nth-child(7) a
.tl-pagination li:nth-child(8) a
.tl-pagination li:nth-child(10) a

2.5.5 Target Size (Enhanced)

Tags: @2.5.5 @aaa @automatic

Rule: 2.5.5 Target Size (Enhanced), Level AAA

Scenario Outline: Each link has a target area size and spacing of at least 44 by 44 pixels

When I view the rendered "<element>"

Then it should have a width and height of at least 44px

Examples:

element
.tl-pagination > a:first-child
.tl-pagination > ol + a
.tl-pagination li:nth-child(1) a
.tl-pagination li:nth-child(3) a
.tl-pagination li:nth-child(4) a
.tl-pagination li:nth-child(5) a
.tl-pagination li:nth-child(6) a
.tl-pagination li:nth-child(7) a
.tl-pagination li:nth-child(8) a
.tl-pagination li:nth-child(10) a
Back to top

We like to listen

Wherever you are in your accessibility journey, get in touch if you have a project or idea.

hello@tetralogical.com
Colour scheme

60 Windsor Avenue, London, SW19 2RR, UK +44 (0)20 8895 6768 hello@tetralogical.com

© TetraLogical Services Ltd. All Rights Reserved. Company number 12951928.

Privacy policy • Accessibility statement • Code of ethics