Skip to content

fix(accessibility): fix multiple accessibility issues#1720

Merged
edward-ly merged 2 commits intomasterfrom
fix/noid/accessibility-fixes
Mar 26, 2026
Merged

fix(accessibility): fix multiple accessibility issues#1720
edward-ly merged 2 commits intomasterfrom
fix/noid/accessibility-fixes

Conversation

@miaulalala
Copy link
Copy Markdown
Contributor

@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:

@edward-ly
Copy link
Copy Markdown
Collaborator

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

Copy link
Copy Markdown
Collaborator

@edward-ly edward-ly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look great so far! Just one question about the "Skip to main content" link: should the text color be white for readability as well, or does it not matter as much?

Here's what the link currently looks like:
Image

@AndyScherzinger
Copy link
Copy Markdown
Member

should the text color be white for readability as well, or does it not matter as much?

Should be white as well I'd say.

Nextcloud server has a nice image there by now but that is not needed or could be a follow-up PR.

Signed-off-by: Anna Larch <anna@nextcloud.com>
@miaulalala miaulalala force-pushed the fix/noid/accessibility-fixes branch from 919e410 to 4032177 Compare March 23, 2026 08:14
Comment thread nextcloudappstore/core/static/assets/css/style.css
The text color was not appearing because color: #fff was set on the
base rule rather than the :focus rule where the element becomes visible.

Signed-off-by: Anna Larch <anna@nextcloud.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@miaulalala miaulalala requested a review from edward-ly March 26, 2026 11:39
Copy link
Copy Markdown
Collaborator

@edward-ly edward-ly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 Failing tests are unrelated and will be resolved separately.

@edward-ly edward-ly merged commit 2674bd1 into master Mar 26, 2026
6 of 8 checks passed
@edward-ly edward-ly deleted the fix/noid/accessibility-fixes branch March 26, 2026 14:58
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.

3 participants