ConformanceLevel

public enum ConformanceLevel : Int

An enum specifying all WCAG conformance levels.

  • A

    The minimum level of conformance.

    Declaration

    Swift

    case A = 1
  • AA

    The medium level of conformance including success criterias of level A.

    Declaration

    Swift

    case AA = 2
  • AAA

    The highest level of conformance including success criterias of level A and AA.

    Declaration

    Swift

    case AAA = 3
  • Indicates that no level of conformance has been reached.

    Declaration

    Swift

    case failed = 0
  • Initializes a ConformanceLevel based on a given contrast ratio and font information used for the text.

    Declaration

    Swift

    public init(contrastRatio: CGFloat, fontSize: CGFloat, isBoldFont: Bool)

    Parameters

    contrastRatio

    The contrast ratio of a text and its background.

    fontSize

    The font size of the text.

    isBoldFont

    Information regarding the font weight.