Skip to content

Add Locator strategy for finding an input (labellable) element by the text of the label #1580

Open
@msingle

Description

@msingle

Add a Locator Strategy for locating an input-type element (<select>, <input>, etc and potentially even non-input labellable elements) by the text of the label for that element.

In addition to being an incredibly common use case, this will encourage improving the accessibility (a11y) of the markup - forms having labels is one of the first checks by Chrome DevTools' Lighthouse, Firefox's Developer Tools (Accessibility tab) or other accessibility checkers. These are all based off the WCAG guidelines

I'll can write it up more formally with a pull request if it seems worthwhile.

(Originally created in SeleniumHQ/selenium#9342)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions