Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.8.9] Accessibility: aria-posinset index starts illegally at zero on discussion list feed #4143

Closed
hollsk opened this issue Dec 21, 2024 · 0 comments · Fixed by #4191
Closed
Labels
type/accessibility Issues relating to accessibility (keyboard navigation, screenreaders, text contrast, etc.)
Milestone

Comments

@hollsk
Copy link

hollsk commented Dec 21, 2024

Current Behavior

Pull #3359 added useful aria Feed markup to discussion lists. The calculation that works out which number each item in the feed starts at has a small bug. The article count begins at zero instead of 1:

aria-posinset={pageNum * pageSize + itemNum}

Steps to Reproduce

You can see this in action by inspecting the HTML generated for the main discussion list at discuss.flarum.org:

<ul role="feed" class="DiscussionList-discussions">
    <li data-id="28506" role="article" aria-setsize="-1" aria-posinset="0">...</li>...
</ul>

Expected Behavior

Per the WAI-ARIA specification for this attribute, aria-posinset needs to start at 1:

Authors MUST set the value for aria-posinset to an integer greater than or equal to 1, and less than or equal to the size of the set when that size is known. Authors SHOULD use aria-setsize.

Screenshots

No response

Environment

  • Flarum version: 1.8.9

Output of php flarum info

No response

Possible Solution

No response

Additional Context

No response

@hollsk hollsk changed the title Accessibility: aria-posinset index starts illegally at zero on discussion list feed [1.8.9] Accessibility: aria-posinset index starts illegally at zero on discussion list feed Feb 8, 2025
@SychO9 SychO9 added type/accessibility Issues relating to accessibility (keyboard navigation, screenreaders, text contrast, etc.) and removed type/bug labels Feb 21, 2025
@SychO9 SychO9 added this to the 2.0.0-beta.3 milestone Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/accessibility Issues relating to accessibility (keyboard navigation, screenreaders, text contrast, etc.)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants