Skip to content

Releases: citizensadvice/capybara_accessible_selectors

v0.12.0

02 Apr 13:35
347bbe0
Compare
Choose a tag to compare

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" as nil
  • 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

22 Jan 17:20
679abc4
Compare
Choose a tag to compare

Added

  • :img selector and matcher [Phillip Kessels]
  • :dialog selector and matcher
  • :heading selector and matcher
  • aria 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 and validation_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 headings
  • validation_error filter
    • now checks for validity.valid or the aria-invalid=true attribute
      Previously it required aria-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
  • have_validation_errors:
    • allows use of within and within_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
  • The current filter will now accept nil to match having no aria-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

23 Jan 13:57
55fa9e1
Compare
Choose a tag to compare
  • 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

05 Oct 15:03
392fec2
Compare
Choose a tag to compare
  • 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

01 Apr 10:34
ebe3cf3
Compare
Choose a tag to compare
  • Added an optional block to select_tab
  • Fixed documentation for select_tab

v0.4.2

14 Apr 02:27
288aa63
Compare
Choose a tag to compare

Fixed Ruby 3 errors.
Filter list_box_option nodes based on whether or not aria-selected="true".