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

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

Open
hollsk opened this issue Dec 21, 2024 · 0 comments
Labels

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant