Skip to content

aria-role="application" should be allowed when a widget role is required. #890

@gamesaucer

Description

@gamesaucer

When using an element that is not normally focusable, and making it focusable, a WAI-ARIA widget role is required. However, the spec states the following in the "application" role:

When there is a need to create an element with an interaction model that is not supported by any of the WAI-ARIA widget roles, authors MAY give that element role application.

Therefore, shouldn't it be permitted to use the "application" role when normally a widget role is required? I'm using aXe Coconut 3.3.0.0 and it doesn't recognise this exception. It throws the following violation:

Elements in the focus order need a role appropriate for interactive content

Here is a code snippet that will produce that violation:

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>Example page</title>
    </head>
    <body><main>
        <h1>Main content</h1>
        <div tabindex="0" role="application">
            Application
        </div>
    </main></body>
</html>

Metadata

Metadata

Assignees

No one assigned

    Labels

    best practicefixBug fixesrulesIssue or false result from an axe-core rule

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions