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

Jetpack Pro Dashboard: visually hide the label of the toggle control in the monitor notification settings popup. #79777

Merged
merged 1 commit into from
Jul 24, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export default function EmailNotification( {
setEnableEmailNotification( isEnabled );
} }
checked={ enableEmailNotification }
className="notification-settings__toggle-control"
/>
</div>
<div className="notification-settings__toggle-content">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export default function MobilePushNotification( {
setEnableMobileNotification( isEnabled );
} }
checked={ enableMobileNotification }
className="notification-settings__toggle-control"
/>
</div>
<div className="notification-settings__toggle-content">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export default function SMSNotification( {
}
onChange={ handleToggleClick }
checked={ enableSMSNotification }
className="notification-settings__toggle-control"
/>
</div>
<div className="notification-settings__toggle-content">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,14 @@
margin-right: 7px;
}
}

// Visually hide the toggle control label by positioning
// it far off-screen, making it effectively invisible.
// It will be used by screen readers
.notification-settings__toggle-control label {
position: absolute;
left: -9999px;
width: 1px;
height: 1px;
overflow: hidden;
}