Headings & Accessibility

A presentation at Internal in April 2024 in by Todd Libby

Slide 1

Slide 1

HEADINGS AND ACCESSIBILITY

Slide 2

Slide 2

HEADINGS MAIN FOUNDATION OF A PAGE SO USERS CAN EASILY READ THE CONTENTS OF A PAGE.

Slide 3

Slide 3

HEADING LEVELS HAVE MEANING

Slide 4

Slide 4

BENEFITS USERS OF SCREEN READERS & ASSISTIVE TECHNOLOGY

Slide 5

Slide 5

BENEFITS SEMANTIC MARKUP & WELL-STRUCTURED HEADINGS BENEFIT SEO & READERS OF THE SITE.

Slide 6

Slide 6

A HEADING CAN BE USED WHERE HEADING CONTENT IS EXPECTED. HEADING CONTENT DEFINES THE HEADER OF A SECTION (WHETHER EXPLICITLY MARKED UP USING SECTIONING CONTENT ELEMENTS OR IMPLIED BY THE HEADING CONTENT ITSELF). ⎯ The HTML Living Standard, The H1, H2, H3, H4, H5, And H6 Elements

Slide 7

Slide 7

GOOD •ONE <H1> PER PAGE. •USE HEADINGS TO DESCRIBE THE CONTENT BELOW. •DO NOT USE A HEADING JUST TO MAKE TEXT STAND OUT. •USE HEADINGS LIKE A TABLE OF CONTENTS IN A BOOK. HIERARCHICAL. •CHOOSE A HEADING BY CONTEXT, NOT BY HOW YOU’RE GOING TO STYLE IT. •DO NOT AT ANY TIME SKIP A HEADING LEVEL AT ALL.

Slide 8

Slide 8

BAD •USING <H2> FOR QUOTES. <CITE> OR <Q> SHOULD BE USED INSTEAD. •DON’T USE AN <H4> AS THE FIRST PARAGRAPH OF TEXT BECAUSE IT LOOKS LIKE DEFAULT TEXT. •USING A <H2> AS THE “DEFAULT” HEADING FOR EVERY SECTION ON EVERY PAGE. •MULTIPLE <H1> ON A PAGE. •OMITTING HEADINGS BECAUSE OF A DESIGN. •LEAVING HEADINGS EMPTY.

Slide 9

Slide 9

<H1> THE MAIN HEADING

Slide 10

Slide 10

<H2> - <H6> USED FOR NAVIGATION AS HIERARCHICAL ORDER FOR SCREEN READERS/ASSISTIVE TECH.

Slide 11

Slide 11

HIERARCHICAL

Slide 12

Slide 12

YOU CAN START WITH AN H1 : : : : : : : : : h1 title of article h2 subheading in the content of the article h3 subheading of the h2 h4 subheading of the h3 h2 subheading in the content of the article h2 Related article (the aside section) h2 Contact us (in the footer) h3 Address (the address information) h3 Follow us (social media links)

Slide 13

Slide 13

YOU CAN START WITH AN H2 h2 h2 : : : : : : : : : : : : : : h1 main menu sidebar h3 More news h3 Testimonials h3 About us title of article h2 subheading in the content of the article h3 subheading of the h2 h4 subheading of the h3 h2 subheading in the content of the article h2 Related article (the aside section) h2 Contact us (in the footer) h3 Address (the address information) h3 Follow us (social media links)

Slide 14

Slide 14

Slide 15

Slide 15

WCAG GUIDELINES

Slide 16

Slide 16

1.3.1 INFO & RELATIONSHIPS INFORMATION, STRUCTURE, AND RELATIONSHIPS CONVEYED THROUGH PRESENTATION CAN BE PROGRAMMATICALLY DETERMINED OR ARE AVAILABLE IN TEXT.

Slide 17

Slide 17

EXPLAINED SIGHTED USERS PERCEIVE STRUCTURE AND RELATIONSHIPS THROUGH VISUAL CUES. BOLD FONTS, BULLETED LIST ITEMS, INDENTED TEXT, SPACES BETWEEN PARAGRAPHS, ETC.

Slide 18

Slide 18

HEADINGS GIVE SCREEN READER USERS CUES THOUGHT THE ASSISTIVE TECHNOLOGY TO WHERE THEY ARE ON A PAGE.

Slide 19

Slide 19

HEADINGS CREATE AN OUTLINE FOR A PAGE.

Slide 20

Slide 20

• H1: My Favorite Recipes • H2: Quick and Easy • H3: Lobster Dumplings • H3: Lobster in Soups • H4: Lobster Bisque • H4: Lobster Chowder • H4: Seafood Chowder • H2: Some Assembly Required • H3: Lobster Rolls • H3: Lobster Spaghetti • H4: Lobster Ravioli • H4: Lobster Scampi • H2: All-In • H3: Boiled Lobster Dinner • H3: Baked Lobster Dinner

Slide 21

Slide 21

2.4.1 BYPASS BLOCKS A MECHANISM IS AVAILABLE TO BYPASS BLOCKS OF CONTENT THAT ARE REPEATED ON MULTIPLE WEB PAGES

Slide 22

Slide 22

EXAMPLE SKIP TO CONTENT LINKS

Slide 23

Slide 23

2.4.6 HEADINGS & LABELS HEADINGS AND LABELS DESCRIBE PURPOSE

Slide 24

Slide 24

HEADINGS DO NOT NEED TO BE LENGTHY. JUST DESCRIPTIVE.

Slide 25

Slide 25

2.4.10 SECTION HEADINGS SECTION HEADINGS ARE USED TO ORGANIZE THE CONTENT

Slide 26

Slide 26

WE DON’T DO LEVEL AAA, TODD!

Slide 27

Slide 27

AIM FOR AAA LEVEL IT WON’T HURT.

Slide 28

Slide 28

3.2.3 CONSISTENT NAVIGATION LEVEL NAVIGATIONAL MECHANISMS THAT ARE REPEATED ON MULTIPLE WEB PAGES WITHIN A SET OF WEB PAGES OCCUR IN THE SAME RELATIVE ORDER EACH TIME THEY ARE REPEATED, UNLESS A CHANGE IS INITIATED BY THE USER.

Slide 29

Slide 29

AGAIN… JUST USE CONSISTENT PRESENTATION AND LAYOUT FOR USERS WHO INTERACT WITH REPEATED CONTENT.

Slide 30

Slide 30

ARIA YES! YOU CAN USE ARIA!

Slide 31

Slide 31

role=“heading” AND aria level

Slide 32

Slide 32

/ <

<div role=”heading” aria level=”2”>This is a heading level two! div>

Slide 33

Slide 33

role=“heading” IS WELLSUPPORTED BY SCREEN READERS!

Slide 34

Slide 34

USE CASES

Slide 35

Slide 35

•FIX THE HEADING STRUCTURE OF LEGACY CODE WITHOUT ALSO NEEDING TO ADJUST THE CSS. THIS IS A QUICK FIX THAT MAKES SENSE. •USE A DIV, WITH A ROLE OF HEADING AND AN ARIA-LEVEL, TO AVOID HAVING TO REMOVE THE NATIVE HEADING CSS STYLING. NOT SUGGESTED AS A METHOD. •ADD A LEVEL LARGER THAN 6.

Slide 36

Slide 36

REMEMBER! THE FIRST RULE OF ARIA FIGHT CLUB!

Slide 37

Slide 37

DON’T USE ARIA!

Slide 38

Slide 38

DON’T USE ARIA! UNLESS YOU REALY, REALLY, REALLY, REALLY HAVE TO.

Slide 39

Slide 39

DESIGN • TWO <H1>’S - NO. BAD PRACTICE/MEANINGLESS STRUCTURE. • IS THE LOGO A HEADING. PROBABLY NOT. LOGOS ARE REOCCURRING COMPONENTS. • ONE <H1> AND SUBSEQUENT HIERARCHICAL HEADINGS GOOD FOR SEO & A11Y. • DESCRIPTIVE HEADINGS. • DON’T USE ALL CAPS! HARDER TO READ FOR SOME. • DON’T STYLE HEADINGS CHAOTICALLY. USE A DESIGN SYSTEM/HIERARCHICAL FONT SIZES.

Slide 40

Slide 40

DEVELOPMENT • GIVE THE CONTENT MANAGER THE OPPORTUNITY TO ADD OR CHANGE A HEADING WHILE ADDING A COMPONENT. • IF A COMPONENT IS ADDED BY THE THEME: CHANGE THE HEADING LEVEL AS NEEDED IN THE CODE. • MOST COMPONENTS HAVE THEIR OWN HEADINGS. • THAT HEADING SHOULD FIT THE STRUCTURE OF THE PAGE.

Slide 41

Slide 41

SEO • SEARCH ENGINES LOVE TEXT, CONTENT, WRITTEN WORD. • SEARCH ENGINES CAN INDEX PAGES BETTER AND FASTER. • HEADINGS ACT AS SIGNPOSTS FOR USERS AND SEO. • HEADINGS DEFINE WHAT PARTS OF CONTENT ARE IMPORTANT. • WELL-STRUCTURED HEADINGS BENEFIT SEO AND THE READER.

Slide 42

Slide 42

THANKS!