fix: address review comments
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/promote/production Build is passing

This commit is contained in:
Simon 2026-02-17 15:30:23 +01:00
parent b1a9eb8b1d
commit 911f308a67
Signed by: simon
GPG key ID: 40E7A58C4AA1EDB2
7 changed files with 88 additions and 164 deletions

View file

@ -3,7 +3,7 @@ defmodule MvWeb.MemberLive.IndexGroupsAccessibilityTest do
Tests for accessibility of groups feature in the member overview.
Tests cover:
- Badges have role="status" and aria-label
- Badges have aria-label for group membership (no role="status"; reserved for live regions)
- Filter dropdown has aria-label
- Sort header has aria-label for screen reader
- Keyboard navigation works (Tab through filter, sort header)
@ -44,7 +44,7 @@ defmodule MvWeb.MemberLive.IndexGroupsAccessibilityTest do
end
@tag :ui
test "group badges have role and aria-label", %{
test "group badges have aria-label for screen readers", %{
conn: conn,
member1: member1,
group1: group1
@ -52,8 +52,8 @@ defmodule MvWeb.MemberLive.IndexGroupsAccessibilityTest do
conn = conn_with_oidc_user(conn)
{:ok, view, html} = live(conn, "/members")
# Verify badges have role="status" and aria-label containing the group name
assert has_element?(view, "span[role='status'][aria-label*='#{group1.name}']")
# Verify badges have aria-label containing the group name (no role=status on badges)
assert has_element?(view, "span[aria-label*='#{group1.name}']")
assert html =~ group1.name
# Verify member1's row contains the badge