No Code Attached Yet a11y
avatar bembelimen
bembelimen
5 May 2025

Steps to reproduce the issue

  1. Open any dialog (e.g. during the installation changing the language or the batch modal in com_content backend)
  2. Inspect the dialog/headline with your browser developer tool

Expected result

  • Dialog has aria-labelledby="xxx" pointing to the headline of the dialog

Actual result

  • No pointers to the headline

Additional comments

Issue was mentioned by @exlemor and confirmed by @brianteeman in this PR, so probably you have an idea how to solve this?

Current status is: Dialogs are generated in this file as web component. Specific in line 188 the dialog element is created. I think the attributes has to be added when there is a header in line 206.
Now here is the challenge: the headline needs an ID, which is not that easy, especially if there are more than one dialog at the page. Do we need to remember how many times a dialog is created?

Any idea?

//cc @Fedik as you know the dialog I guess :-)

avatar bembelimen bembelimen - open - 5 May 2025
avatar joomla-cms-bot joomla-cms-bot - change - 5 May 2025
Labels Added: No Code Attached Yet a11y
avatar joomla-cms-bot joomla-cms-bot - labeled - 5 May 2025
avatar Fedik
Fedik - comment - 5 May 2025

This need a clarification, there nothing about it at https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/dialog documentation

avatar Fedik Fedik - change - 5 May 2025
Labels Added: Information Required
avatar Fedik Fedik - labeled - 5 May 2025
avatar Fedik
Fedik - comment - 5 May 2025

Most of these about custom-made modals, with divs.

The native dialog should be pretty accessible on its own.
Having an extra aria on them looks like nice to have, but not requirement.

We can add aria-label, equal to the header (when it non empty), or aria-labelledby pointing to header.
But it sounds like unneeded complication.

avatar Fedik Fedik - change - 5 May 2025
Labels Removed: Information Required
avatar Fedik Fedik - unlabeled - 5 May 2025
avatar brianteeman
brianteeman - comment - 5 May 2025

it is a requirement

avatar Fedik
Fedik - comment - 5 May 2025

No one said that, in the linked articles about dialog (NOT div role=dialog) element.

But we can add.

avatar Fedik
Fedik - comment - 5 May 2025

No one said that in the linked articles about dialog (NOT div role=dialog) element.

But we can add.

avatar brianteeman
brianteeman - comment - 5 May 2025

it doesnt say that having an alt description on an image is a requirement in the specification of the img element either but it is still an accessibility requirement
:)

avatar Fedik
Fedik - comment - 5 May 2025

Yeah, that is true 😄

avatar dgrammatiko
dgrammatiko - comment - 5 May 2025

FWIW even the w3c guidelines for the <dialog> element have the requirement for the title: https://www.w3.org/WAI/WCAG22/Techniques/html/H102

avatar chmst
chmst - comment - 5 May 2025

The dialog headline has a non-tranlated "JCLOSE" for the dismiss button.

Image

avatar Fedik
Fedik - comment - 5 May 2025

It is missing JText::script('JCLOSE'); somewhere in PHP side

avatar brianteeman
brianteeman - comment - 23 May 2025

Language string addressed in #45520

Add a Comment

Login with GitHub to post a comment