RoleExpectation

io.github.frikit.twirlspec.expect.RoleExpectation
final case class RoleExpectation(roleName: String, name: Option[Expected], count: Option[Int]) extends Expectation

An element located by ARIA role and accessible name.

Attributes

Source
ContentExpectations.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Expectation
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def check(page: Page): Seq[Violation]

Empty means satisfied.

Empty means satisfied.

Attributes

Source
ContentExpectations.scala
def description: String

Human description, used when listing what a page was checked against.

Human description, used when listing what a page was checked against.

Attributes

Source
ContentExpectations.scala
def named(key: String, args: Any*): RoleExpectation

The name an assistive technology announces, from a message key.

The name an assistive technology announces, from a message key.

Attributes

Source
ContentExpectations.scala
def namedMatching(regex: Regex): RoleExpectation

The accessible name matches this pattern.

The accessible name matches this pattern.

Attributes

Source
ContentExpectations.scala
def namedText(literal: String): RoleExpectation

The accessible name, given as the exact words rather than a message key.

The accessible name, given as the exact words rather than a message key.

Attributes

Source
ContentExpectations.scala
def occurring(times: Int): RoleExpectation

Exactly this many elements carry the role, and the name where one is given.

Exactly this many elements carry the role, and the name where one is given.

Attributes

Source
ContentExpectations.scala

Inherited methods

def and(other: Expectation): Expectation

Both this expectation and another, as one.

Both this expectation and another, as one.

Attributes

Inherited from:
Expectation
Source
Expectation.scala

Downgrade every violation this expectation produces to a warning.

Downgrade every violation this expectation produces to a warning.

Attributes

Inherited from:
Expectation
Source
Expectation.scala
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def when(p: Page => Boolean): Expectation

Only apply this expectation when the page satisfies a predicate.

Only apply this expectation when the page satisfies a predicate.

Attributes

Inherited from:
Expectation
Source
Expectation.scala