SiteLint documentation and guidelines

Verify consistent identification

Description

This rule does not automatically validate anything. It simply reminds you to manually verify that components with the same functionality within a set of web pages are identified consistently. It collects all interactive and identifiable elements on the current page – including <button>, <a> links, <img> images, elements with [role="button"] or [role="link"], and <svg> icons – and reports their counts by tag name so a human auditor can compare labels, accessible names, and visual cues across different pages of the site.

This requirement comes from WCAG Success Criterion 3.2.4 (Consistent Identification), which states that Components that have the same functionality within a set of web pages are identified consistently. For example, a search icon labeled Search on the home page should not be labeled Find on a product page, and a Contact Us link should not become Get in Touch on another page. Inconsistent labeling disrupts users’ mental models, increases cognitive load, and makes the interface unpredictable for assistive technology users.

Disabilities impacted

  • Cognitive disabilities – Users with cognitive impairments, learning disabilities, or memory challenges rely on predictable, repeatable patterns. When the same function uses different labels across pages, users must re-learn the interface on every page, increasing frustration and error rates.
  • Screen reader users (blindness and low vision) – Screen reader users build a mental map of a site based on the accessible names they hear. If a component that performs the same action has a different accessible name on different pages, users may not recognize it as the same control, leading to confusion or the assumption that the feature is unavailable.
  • Motor disabilities – Users who rely on voice control software (e.g., Dragon NaturallySpeaking) or switch devices issue commands by speaking or selecting visible labels. If the same function uses inconsistent text, voice commands that work on one page may fail on another, forcing users to guess alternative commands or fall back to slower navigation methods.
  • Low vision users with screen magnification – Users who zoom in or use screen magnifiers see only a portion of the page at a time. They rely on visual landmarks and familiar labels to locate controls quickly. Inconsistent labels force them to spend extra time scanning the magnified viewport to confirm they have found the correct element.

Why it matters

Consistent identification is a cornerstone of usable, accessible web design. When users encounter the same functionality with the same label everywhere, they develop confidence and operate more efficiently. WCAG 3.2.4 is a Level AA requirement, meaning it must be satisfied for a site to claim conformance at that level. Beyond compliance, inconsistent naming is a common source of support tickets, user errors, and abandoned transactions – particularly in multi-step workflows like checkout, registration, or form submission. For organizations subject to ADA or Section 508 regulations, failing to meet this criterion can expose the site to legal risk. Consistent identification also benefits search engine optimization: crawlers and bots index link text and button labels, and inconsistent naming dilutes the semantic signal that helps search engines understand page relationships.

Coding problems and solutions

Since this rule is manual-only, it does not automatically detect inconsistencies. Instead, it reports the interactive elements found on the current page so you can compare them against other pages. Below is a checklist of what to manually verify and common pitfalls to look for during your audit.

Common coding problems

  • Same icon, different aria-label – A search magnifying glass icon has aria-label="Search" on the header but aria-label="Find products" on a category page.
  • Navigation link text varies for the same destination – One page uses Contact Us while another uses Get in Touch or Support to link to /contact.
  • Form submit buttons have inconsistent labels – A registration form uses value="Sign Up" on the landing page but value="Create Account" on a campaign-specific variant of the same form.
  • Accessible name does not match visible text – A button displays Next but its aria-label is set to Continue to step 2, creating a mismatch between what sighted users see and what assistive technology announces.
  • Alt text for identical functional images differs – The same printer icon used across the site has alt="Print this page" on one template and alt="Printer" on another.
  • ARIA roles with inconsistent accessible names – A <div role="button"> for opening a modal has aria-label="Open settings" in the toolbar but aria-label="Preferences" in the sidebar.
  • SVG icons with varying <title> or aria-labelledby values – The same cart icon SVG uses <title>Shopping cart</title> on one page and <title>View cart</title> on another.

How to fix it

Audit all interactive components across pages

Create a spreadsheet or use this tool on each page of your site to inventory every button, link, image, and interactive element. Compare the labels, accessible names, and visible text for elements that perform the same function. Flag any inconsistencies for correction.

Correct example
<!-- Page A: Home -->
<button type="button" aria-label="Search">
  <svg aria-hidden="true">...</svg>
</button>

<!-- Page B: Products -->
<button aria-label="Search">
  <svg aria-hidden="true">...</svg>
</button>
Incorrect example
<!-- Page A: Home -->
<button type="button" aria-label="Search">
  <svg aria-hidden="true">...</svg>
</button>

<!-- Page B: Products — inconsistent label -->
<button aria-label="Find products">
  <svg aria-hidden="true">...</svg>
</button>

Establish a naming convention and apply it globally

Define canonical labels for every reusable component in your style guide or design system documentation. For example, decide that the search function will always use the accessible name Search, and that the primary call-to-action for account creation will always read Create account. Enforce these conventions through code review and linting rules.

Correct example
<!-- Consistent across all pages -->
<a href="/contact">Contact Us</a>
<button type="submit">Create account</button>
<label for="search">Search</label>
<input type="search" id="search">
Incorrect example
<!-- Page A -->
<a href="/contact">Contact Us</a>
<button type="submit">Sign up</button>

<!-- Page B: same functionality, different labels -->
<a href="/contact">Get in Touch</a>
<button type="submit">Register now</button>

Match accessible names to visible labels

When an element has both visible text and an aria-label or aria-labelledby attribute, ensure the accessible name starts with or closely matches the visible label. WCAG 2.1 Success Criterion 2.5.3 (Label in Name) reinforces this principle. A mismatch confuses speech-input users who speak the visible text but trigger a different accessible name.

Correct example
<button type="button" aria-label="Next step">Next</button>
Incorrect example
<!-- Visible text says "Next" but accessible name is unrelated -->
<button aria-label="Proceed to payment details">Next</button>

Keep alt text consistent for identical functional images

If the same icon or image performs the same action across the site, its alt attribute value must be identical. This applies to icons used in toolbars, action bars, and navigation menus. Decorative images that carry no function should use alt="" consistently as well.

Correct example
<button type="button">
  <img src="print.svg" alt="Print this page">
</button>

<!-- Same icon, same alt on every page -->
<button>
  <img src="print.svg" alt="Print this page">
</button>
Incorrect example
<!-- Page A -->
<button type="button">
  <img src="print.svg" alt="Print this page">
</button>

<!-- Page B: same icon, different alt -->
<button>
  <img src="print.svg" alt="Printer">
</button>

Use a shared component library to enforce consistency

The most reliable way to ensure consistent identification is to encapsulate interactive components in a shared library or templating system. When every page renders the search button from the same component definition, its label, accessible name, and role are guaranteed to be identical. This approach scales across large teams and reduces the risk of one-off variations introduced during page-specific development.

Correct example
<!-- Shared component definition used on all pages -->
<search-button label="Search"></search-button>

<!-- Renders consistently as: -->
<button type="button" aria-label="Search" class="search-btn">
  <svg aria-hidden="true">...</svg>
</button>
Incorrect example
<!-- Hand-coded on each page, prone to drift -->

<!-- Page A -->
<button type="button" class="search" aria-label="Search site"><svg>...</svg></button>

<!-- Page B: developer copied but changed the label -->
<button type="button" class="search" aria-label="Find something"><svg>...</svg></button>

Known Limitations

  • Manual-only rule – Because this rule relies on requiresManualVerification: true, it cannot detect inconsistent labeling automatically. It only reports which interactive elements exist on the current page. The auditor must compare results across multiple pages and exercise their own judgment.
  • Single-page scope – The rule analyzes only the page currently loaded in the browser. It cannot compare labels across different URLs, page templates, or sections of the site. Cross-page consistency must be verified manually by the auditor.
  • Dynamic content and single-page applications (SPAs) – In SPAs where the DOM changes without full page reloads, components may be added or removed after the initial scan. The rule captures elements present at scan time; it does not monitor mutations or re-renders triggered by client-side routing.
  • Shadow DOM – Elements inside open shadow roots are included in the scan, but elements in closed shadow roots are not reachable. If a site uses closed shadow DOM for interactive components, those elements will be missing from the count and must be checked separately.
  • Localization and internationalization – Sites that serve content in multiple languages may intentionally use different labels for the same component in different locales. The auditor must distinguish between legitimate localization differences and genuine inconsistencies within the same locale.
  • Third-party and embedded content – Widgets, iframes, and embedded third-party components (e.g., chat widgets, payment forms, social media embeds) may use labels outside the site owner’s control. These are included in the element count but may not be practically correctable.

Resources

Rule

  • Audit: accessibility
  • Standard: WCAG
  • Level: AA
  • Success Criteria: 3.2.4
  • Rule ID: consistent-identification