minkphp / minkphp/Mink

Selectors should recognise aria-label and aria-labelled-by where appropriate

Open
#779 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
1.6k
Forks
286
PR merge metrics
No merged PRs in 30d

Description

The selectors defined in https://github.com/minkphp/Mink/blob/master/src/Selector/NamedSelector.php do a good job of recognising most HTML. E.g. they will find a checkbox by the associated , or a link but the alt text of the icon inside the .

However, at present they do not find e.g. , or using aria-labelled-by="id" on the checkbox, rather than for="id" on the label. It would be nice to fix this.

(This is something we would like in the Moodle project. See https://tracker.moodle.org/browse/MDL-65940.)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/Selector/NamedSelector.php and trace how selectors match associated labels, links, and image alt text. Add recognition for the issue's aria-label and aria-labelled-by examples, then verify that checkbox and other appropriate element lookups succeed through the existing selector behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
accessibility, testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.