nextcloud / notifications

:bell: Notifications app for Nextcloud

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BITV] Dismiss button is highlighted by default

SystemKeeper opened this issue · comments

Steps to reproduce

  1. Receive a notification and open it

Expected behaviour

image

Actual behaviour

Bildschirm­foto 2023-01-30 um 12 52 07

The screenshots above are from safari, but happens on chrome too (just having the button rounded):
image

Server configuration

Tested with

sudo docker run -it \                                 
    -e SERVER_BRANCH=master \
    -e TALK_BRANCH=master \
    -e NOTIFICATIONS_BRANCH=master \
    -e TRUSTED_DOMAIN=192.168.178.108 \
    --name nextcloud-easy-test-master \
    -p 443:443 \
    ghcr.io/szaimen/nextcloud-easy-test:latest

Master was at 1779f4f.

The same happens with 25.0.3. So not sure if this is a bug or intended to highlight the first close button.

This is done by HeaderMenu.vue
It focuses the first targetable thing for accessibility reasons.

Not sure what would be a better approach, as there could be an activity without interactive element nor actions as well.
cc @Pytal

commented

We could make the focus border only appear when keyboard focused by setting the style on :focus-visible instead of :focus

Would it pass the accessibility audit if we only show the focus border when opening the menu with keyboard but not mouse @michaelnissenbaum?

commented

We could make the focus border only appear when keyboard focused by setting the style on :focus-visible instead of :focus

Would it pass the accessibility audit if we only show the focus border when opening the menu with keyboard but not mouse @michaelnissenbaum?

Confirmed to be accessible by @michaelnissenbaum