Rule

io.github.frikit.twirlspec.standards.Rule
See theRule companion object
final class Rule(val id: String, val description: String, val pageLevel: Boolean, val severity: Severity, val criterion: Option[Criterion], run: Page => Seq[Violation])

One named rule.

Value parameters

criterion

the WCAG success criterion the rule enforces, if it enforces one

description

what the rule checks, as a phrase

id

the stable id a spec excludes or selects the rule by

pageLevel

whether the rule applies only to a whole page, so a fragment rendered without a layout is not judged on what only a layout provides

run

the check itself; an empty result means the page passed

severity

whether a finding fails the page or is only reported

Attributes

Companion
object
Source
Rule.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

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

The violations this rule finds on a page: none for a page-level rule on a fragment, and each one a warning when the rule is.

The violations this rule finds on a page: none for a page-level rule on a fragment, and each one a warning when the rule is.

Attributes

Source
Rule.scala
def level: Option[Level]

The conformance level of the criterion this rule enforces, if it enforces one.

The conformance level of the criterion this rule enforces, if it enforces one.

Attributes

Source
Rule.scala
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any
Source
Rule.scala
def wcagVersion: Option[WcagVersion]

The WCAG version the criterion this rule enforces dates from, if it enforces one.

The WCAG version the criterion this rule enforces dates from, if it enforces one.

Attributes

Source
Rule.scala

Concrete fields

val criterion: Option[Criterion]

Attributes

Source
Rule.scala
val description: String

Attributes

Source
Rule.scala
val id: String

Attributes

Source
Rule.scala
val pageLevel: Boolean

Attributes

Source
Rule.scala

Attributes

Source
Rule.scala