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

Modernize ui-helper-hidden-accessible #1

Merged
merged 1 commit into from
Mar 15, 2024

Conversation

melloware
Copy link
Owner

@melloware melloware commented Mar 15, 2024

Based on this https://stackoverflow.com/a/62109988/502366

This jQuery style for screenreaders has not changed in a long time but now that browser have advanced it is missing some features explained in the stack overflow.

    border: 0;
    padding: 0;
    margin: 0;
    position: absolute !important;
    height: 1px; 
    width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px); /*maybe deprecated but we need to support legacy browsers */
    clip-path: inset(50%); /*modern browsers, clip-path works inwards from each corner*/
    white-space: nowrap; /* added line to stop words getting smushed together (as they go onto seperate lines and some screen readers do not understand line feeds as a space */

@melloware melloware merged commit 709f7ac into main Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant