Skip to content

fix(accessibility): fix multiple accessibility issues#1720

Open
miaulalala wants to merge 1 commit intomasterfrom
fix/noid/accessibility-fixes
Open

fix(accessibility): fix multiple accessibility issues#1720
miaulalala wants to merge 1 commit intomasterfrom
fix/noid/accessibility-fixes

Conversation

@miaulalala
Copy link

@miaulalala miaulalala commented Mar 11, 2026

Overview

This branch addresses multiple accessibility issues across the Nextcloud App Store templates and CSS, improving compliance with WCAG 2.1 guidelines and
screen reader compatibility.


Changes

1. Skip-to-content link

Files: base.html, style.css

Added a visually-hidden "Skip to main content" link that becomes visible on keyboard focus.

Why: Keyboard and screen reader users need a way to bypass the navigation bar and jump directly to page content.

References:


2. <main> landmark

File: base.html

Replaced <div class="container" id="body"> with a <main> element.

Why: Screen readers use landmark elements to navigate the page. <main> clearly identifies the primary content region, enabling users to jump directly to it.

References:


3. Heading hierarchy

Files: detail.html, style.css

Sidebar metadata headings were <h5> and section headings were a mixed <h3>/<h4> with no logical nesting. All rationalised to <h2> for top-level sections, <h3> for sub-sections
(e.g. "Your comment").

Why: Screen readers navigate by heading level. Skipping from <h1> to <h5> is disorienting and breaks the document outline.

References:


4. Rating image alt text

File: detail.html

The community rating <img> had alt="", making it invisible to screen readers. Replaced with a descriptive alt text using the rating value.

Why: The image conveys meaningful information (the app's rating), so it requires a descriptive alt attribute.

References:


5. Logo alt text

File: nav.html

Changed alt="Logo" to alt="Nextcloud" and removed the redundant title attribute.

Why: "Logo" is not descriptive — the alt text should identify what the image represents, not just that it is a logo.

References:


6. Carousel controls

File: detail.html

  • Moved aria-label from the decorative <span aria-hidden="true"> to the parent <a> element, so the button has an accessible name.
  • Changed role="listbox" on the carousel container to role="region" with an aria-label.

Why: The label was being hidden from assistive technology along with the icon. listbox is an interactive widget role that did not apply to a static image container.

References:


7. Sidebar navigation landmark

File: app/base.html

Wrapped the category <ul> in <nav aria-label="App categories">.

Why: <nav> is a landmark element that screen readers expose for direct navigation. The label distinguishes it from other navigation regions on the page.

References:


8. aria-current="page" on active nav links

File: app/base.html

Added aria-current="page" to the currently active category link.

Why: Without this, screen reader users have no programmatic way to identify which link corresponds to the current page.

References:


9. Duplicate id on comments heading

File: detail.html

Changed the duplicate id="comments" on the "Your comment" sub-heading to id="your-comment".

Why: Duplicate IDs break anchor links and cause unpredictable behaviour with assistive technologies, which expect IDs to be unique per page.

References:


10. role="search" moved to <form>

File: nav.html

Moved role="search" from the <input> element to the parent <form> element.

Why: Per the ARIA specification, search is a landmark role intended for the containing region, not the input control itself.

References:


11. Removed incorrect role="presentation" from <li> elements

Files: list.html, nav.html

Removed role="presentation" from <li> elements inside navigation lists.

Why: This role suppresses native list item semantics, causing screen readers to skip the items entirely and breaking keyboard navigation of the lists.

References:

Signed-off-by: Anna Larch <anna@nextcloud.com>
@edward-ly
Copy link
Collaborator

Which issues were addressed? Do you mind providing a quick summary?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants