Roles

io.github.frikit.twirlspec.page.Roles
object Roles

Finding elements the way an assistive technology does: by role and accessible name.

Attributes

Source
Roles.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Roles.type

Members list

Value members

Concrete methods

def knownRoles: Set[String]

The roles resolved implicitly from HTML elements.

The roles resolved implicitly from HTML elements.

Attributes

Source
Roles.scala
def matching(document: Document, role: String): List[Element]

Elements with this role, implicit or explicit.

Elements with this role, implicit or explicit.

An element carrying an explicit role is matched only by that role, so <a role="button"> is a button and not a link.

Attributes

Source
Roles.scala
def selectorFor(role: String): String

A CSS selector for the elements that can carry this role, implicitly or explicitly, for failure messages. What a selector cannot say alike in every jsoup, such as a select's rows, a section's name, what a header sits in or a role written in capitals, matching decides.

A CSS selector for the elements that can carry this role, implicitly or explicitly, for failure messages. What a selector cannot say alike in every jsoup, such as a select's rows, a section's name, what a header sits in or a role written in capitals, matching decides.

Attributes

Source
Roles.scala