Skip to content

Add support for finding buttons that use aria-label for a value.#865

Open
bkosborne wants to merge 1 commit into
minkphp:masterfrom
bkosborne:aria-label-button-support
Open

Add support for finding buttons that use aria-label for a value.#865
bkosborne wants to merge 1 commit into
minkphp:masterfrom
bkosborne:aria-label-button-support

Conversation

@bkosborne

Copy link
Copy Markdown

See #779

This adds support for finding a button by its aria-label value.

@codecov

codecov Bot commented Feb 1, 2024

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.73%. Comparing base (d8527fd) to head (98f712c).
⚠️ Report is 16 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #865   +/-   ##
=========================================
  Coverage     98.72%   98.73%           
  Complexity      374      374           
=========================================
  Files            24       24           
  Lines          1022     1024    +2     
=========================================
+ Hits           1009     1011    +2     
  Misses           13       13           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@maelanleborgne

Copy link
Copy Markdown

As it is very hard to extend the library, I would greatly appreciate if this feature was merged 🙂

@aik099

aik099 commented Nov 15, 2024

Copy link
Copy Markdown
Member

As it is very hard to extend the library, I would greatly appreciate if this feature was merged 🙂

@maelanleborgne , can you please be more specific?

P.S.
I've approved this PR.

I've confirmed, that the tests actually test the added code by removing added HTML elements from the test fixtures one by one and witnessing, that tests start to fail after that.

// cc: @stof

@uuf6429

uuf6429 commented Mar 21, 2025

Copy link
Copy Markdown
Member

Not bad, but aria-label applies to way more elements than just <button>. In particular, it should probably be implemented on '%linkMatch%' (similar to '%buttonMatch%').

@mlncn

mlncn commented Aug 8, 2025

Copy link
Copy Markdown

Thanks for approving— i think it is worth getting in as is, and future improvements (links as well as buttons, aria-labelledby) can build on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants