Automattic / Automattic/jetpack

Ad block: block toolbar menu items under 'Change format' have the role 'menuitemcheckbox' instead of 'menuitem'.

Open
#32,703 2 comments 0 reactions 0 assignees View on GitHub
[Block] Ad [Focus] Accessibility [Platform] Atomic [Plugin] Jetpack [Pri] Normal [Status] Stale Bug
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

### Impacted plugin

Jetpack

### Quick summary

The 'Change format' popover menu items for the Ad block have the 'menuitemcheckbox' role instead of the expected 'menuitem'.

WAI-ARIA explains the 'menuitemcheckbox' as supporting multiple states, but as far as I can tell, this functionality is not used in the current implementation of the Ad block.

### Steps to reproduce

1. enable Jetpack Earn if required (Sidebar -> Jetpack -> Settings (on top right) -> Earn -> Toggle on)
2. start a new post.
3. insert the Ad block.
4. select the block if required.
5. on the editor toolbar, click on the "Change format" button.
6. inspect accessibility settings in the toolbar.

![Screenshot 2023-08-28 at 2 54 33 PM](https://github.com/Automattic/jetpack/assets/6549265/383e07e6-f134-45d6-b1a8-37c8d62c7811)

### A clear and concise description of what you expected to happen.

The popover menu items should have the 'menuitem' role, like with every other block we've seen so far.

### What actually happened

The popover menu has the role 'menuitemcheckbox'.

![Screenshot 2023-08-28 at 2 54 04 PM](https://github.com/Automattic/jetpack/assets/6549265/b71d3c77-bc2f-48c7-910e-1fe8fa7fd3f3)

### Impact

All

### Available workarounds?

No but the platform is still usable

### Platform (Simple and/or Atomic)

Atomic

### Logs or notes

_No response_

Contributor guide

Open the contributing guide

Research direction

Reproduce the Ad block issue in the Jetpack editor and inspect the Change format popover's rendered accessibility roles. Trace the Ad block toolbar implementation and compare it with other block format menus; done means these entries expose the menuitem role instead of menuitemcheckbox.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
accessibility, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.