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

Remove tab index from Altis link #644

Closed
1 task
robindevitt opened this issue Sep 1, 2022 · 0 comments · Fixed by #647
Closed
1 task

Remove tab index from Altis link #644

robindevitt opened this issue Sep 1, 2022 · 0 comments · Fixed by #647
Labels
bug Existing functionality isn't behaving as expected

Comments

@robindevitt
Copy link
Contributor

Originally reported in #629

tabindex="0" is redundant, as links already get keyboard focus by nature.

Code for reference:

function admin_bar_menu( WP_Admin_Bar $wp_admin_bar ) {
$logo_menu_args = [
'href' => admin_url(),
'id' => 'altis',
'title' => '<span class="altis-logo-wrapper"><img src="' . get_logo_url( 'white' ) . '" alt="Altis Admin" /></span>',
];
// Set tabindex="0" to make sub menus accessible when no URL is available.
$logo_menu_args['meta'] = [
'tabindex' => 0,
];
$wp_admin_bar->add_menu( $logo_menu_args );
}

Suggested change is to remove lines 239 - 240

// Set tabindex="0" to make sub menus accessible when no URL is available.
$logo_menu_args['meta'] = [
'tabindex' => 0,
];

Acceptance criteria:

  • Remove tabindex from the Altis link.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Existing functionality isn't behaving as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant