Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve accessibility of default link focus styles in Firefox #5082

Merged
merged 1 commit into from
Jul 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/plugins/css/preflight.css
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,18 @@ button,
cursor: pointer;
}

/**
* Override legacy focus reset from Normalize with modern Firefox focus styles.
*
* This is actually an improvement over the new defaults in Firefox in our testing,
* as it triggers the better focus styles even for links, which still use a dotted
* outline in Firefox by default.
*/

:-moz-focusring {
outline: auto;
}

table {
border-collapse: collapse;
}
Expand Down
12 changes: 12 additions & 0 deletions tests/fixtures/tailwind-output-flagged.css
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,18 @@ button,
cursor: pointer;
}

/**
* Override legacy focus reset from Normalize with modern Firefox focus styles.
*
* This is actually an improvement over the new defaults in Firefox in our testing,
* as it triggers the better focus styles even for links, which still use a dotted
* outline in Firefox by default.
*/

:-moz-focusring {
outline: auto;
}

table {
border-collapse: collapse;
}
Expand Down
12 changes: 12 additions & 0 deletions tests/fixtures/tailwind-output-important.css
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,18 @@ button,
cursor: pointer;
}

/**
* Override legacy focus reset from Normalize with modern Firefox focus styles.
*
* This is actually an improvement over the new defaults in Firefox in our testing,
* as it triggers the better focus styles even for links, which still use a dotted
* outline in Firefox by default.
*/

:-moz-focusring {
outline: auto;
}

table {
border-collapse: collapse;
}
Expand Down
12 changes: 12 additions & 0 deletions tests/fixtures/tailwind-output-no-color-opacity.css
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,18 @@ button,
cursor: pointer;
}

/**
* Override legacy focus reset from Normalize with modern Firefox focus styles.
*
* This is actually an improvement over the new defaults in Firefox in our testing,
* as it triggers the better focus styles even for links, which still use a dotted
* outline in Firefox by default.
*/

:-moz-focusring {
outline: auto;
}

table {
border-collapse: collapse;
}
Expand Down
12 changes: 12 additions & 0 deletions tests/fixtures/tailwind-output.css
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,18 @@ button,
cursor: pointer;
}

/**
* Override legacy focus reset from Normalize with modern Firefox focus styles.
*
* This is actually an improvement over the new defaults in Firefox in our testing,
* as it triggers the better focus styles even for links, which still use a dotted
* outline in Firefox by default.
*/

:-moz-focusring {
outline: auto;
}

table {
border-collapse: collapse;
}
Expand Down