Skip to content

[Feature Request] Helper Functions to Directly Check Accessibility Contrast #18

@iocouto

Description

@iocouto

It would be super useful to have some helper functions that directly check whether two colours pass certain specified accessibility rating - i.e., 'aa', 'aaa', 'aaLarge' and 'aaaLarge'.

Right now, to do that we have to define the colours in question in a blueprint, then use the toReadabilityReport() method to generate an array, then search the array for the results. I'd love to be able to do the checks by simply getting a boolean from something like isAA($colour1, $colour2), or isAAALarge($colour1, $colour2).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions