Releases: citizensadvice/capybara_accessible_selectors
Releases · citizensadvice/capybara_accessible_selectors
v0.12.0
Added
accessible_name
method to Node (Selenium only)accessible_name
filter (Selenium only)role
method to Node- A selenium driver will use the browser's computed role
- Rack test will only return the value of the role attribute
Changed
- (potentially breaking) the
role
filter now uses the browser's resolved accessible role (Selenium only)
and will return "none" and "presentation" asnil
- Passing an empty string to
select_combo_box_option
will clear the combo-box select_combo_box_option
takes a block which can be used to filter the found options- Added the
aria
filter to all selectors that didn't have it
Removed
- Removed support for Ruby 3.0. Minimum supported Ruby version is now 3.1
v0.11.0
Added
:img
selector and matcher [Phillip Kessels]:dialog
selector and matcher:heading
selector and matcheraria
filter to:combo_box
,:disclosure
, and:disclosure_button
[Sean Doyle]
Fixed
:region
selector was finding<section>
elements without an accessible name:section
selector was matching sections with no headings resulting in ambiguous matcher errors
Changed
- All filters will now validate their inputs more strictly
described_by
andvalidation_error
filters will also accept a regular expression- The
:modal
selector will now check a native modal is displaying as a modal :section
selector will also match aria headingsvalidation_error
filter- now checks for
validity.valid
or thearia-invalid=true
attribute
Previously it requiredaria-invalid=true
attribute - now allows the error message to be in the
aria-labelledby
name - now also takes a boolean allowing you to check if a field is or isn't invalid
- now checks for
have_validation_errors
:- allows use of
within
andwithin_fieldset
within the block - allows you to use
radio_group
to match multiple radios by a fieldset legend - added some missing selectors
- corrected logic for finding invalid fields
- allows use of
- The
current
filter will now acceptnil
to match having noaria-current
[Sean Doyle] - Change
:rich_text
to support both[contenteditable="true"]
and[contenteditable=""]
[Sean Doyle]
Removed
- Removed support for Ruby 2.7. Minimum supported Ruby version is now 3.0
v0.10.0
- Added a
required
filter to all form input selectors - The
described_by
filter is now available on all selectors - Fix an issue with filling in rich text within an iframe and the Gecko driver
v0.9.0
- Add role: filter [Sean Doyle]
- Add aria: Hash filter [Sean Doyle]
- Add :article selector and have_article matcher [Sean Doyle]
- Add :grid, :gridcell, :columnheader, and :row[Sean Doyle]
- Add :menu and :menuitem selector [Sean Doyle]
- Add current: filter for :link and :link_or_button selectors [Sean Doyle]
- Add :banner, :contentinfo, :main, :navigation and :region selectors [Sean Doyle]
- Removed focused: in favour of the "native" capybara focus
- Allow the :modal selector to select open elements
- Added a select_disclosure method, that will open a disclosure and run a block within it.
- Fix
fill_in_rich_text
can enter an infinite loop when clearing
v0.7.0
- Added an optional block to
select_tab
- Fixed documentation for
select_tab