elementor / elementor/elementor
A11y Issue in Loop Grid Widget: Missing required child roles for role="list"
- Dominant language
- PHP
- Stars
- 7.1k
- Forks
- 1.6k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 193
Description
### Description
When testing a page built with Elementor using the Experte tool (https://www.experte.com/accessibility), we are getting the following error. This is not the first time it has occurred—it also happened on other sites before.
> "Elements with an ARIA [role] that require children to contain a specific [role] are missing some or all of those required children."
In the past, we have resolved this issue with the following JavaScript. It adds the missing role (listitem) to each loop grid item.
```
/**
* [Elementor] Loop Grid Widget: Fix multiple accessibility issues.
*
* Fixes the following accessibility issues reported by Experte:
*
* 1) Elements with an ARIA [role] that require children to contain a specific [role] are missing some or all of those
* required children.
* Some ARIA parent roles must contain specific child roles to perform their intended accessibility functions.
*
* @version 1.0
*/
( function( $ ) {
$( window ).on( 'elementor/frontend/init', function() {
elementorFrontend.hooks.addAction( 'frontend/element_ready/loop-grid.post', function( $scope ) {
$scope.find( '.e-loop-item' ).attr( 'role', 'listitem' );
} );
} );
} )( jQuery );
```
Thanks in advanced for implemented this accessibility fix! 🙏🏼
### Steps to reproduce
1. Add a Loop Grid to your page.
2. Go and test that page in the Experte Accessibility Checker tool: https://www.experte.com/accessibility
3. Find the following error: "Elements with an ARIA [role] that require children to contain a specific [role] are missing some or all of those required children."
### Expected behavior
1. Every
2. The accessibility test success!
### Elementor System Info
```txt
== Server Environment ==
Operating System: Linux
Software: nginx
MySQL version: MariaDB Server v11.4.7-MariaDB-log
PHP Version: 8.2.29
PHP Memory Limit: 512M
PHP Max Input Vars: 6144
PHP Max Post Size: 2047M
GD Installed: Yes
ZIP Installed: Yes
Write Permissions: All right
Elementor Library: Connected
== WordPress Environment ==
Version: 6.8.2
WP Multisite: No
Max Upload Size: 2 GB
Memory limit: 512M
Max Memory limit: 512M
Permalink Structure: /%year%/%monthnum%/%day%/%postname%/
Language: en_US
Timezone: 0
Debug Mode: Active
== Theme ==
Name: Hello Elementor
Version: 3.4.4
Author: Elementor Team
Child Theme: No
== User ==
Role: administrator
WP Profile lang: en-US
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:142.0) Gecko/20100101 Firefox/142.0
== Active Plugins ==
Elementor
Version: 3.31.2
Author: Elementor.com
Elementor Pro
Version: 3.31.2
Author: Elementor.com
== Must-Use Plugins ==
debug-hook.php
Version:
Author:
== Features ==
Custom Fonts: 0
Custom Icons: 0
== Integrations ==
== Elementor Experiments ==
Inline Font Icons: Active by default
Additional Custom Breakpoints: Active by default
Container: Active by default
Optimized Markup: Inactive by default
Default to New Theme Builder: Active by default
Header & Footer: Active by default
Nested Elements: Active by default
Pages Panel: Inactive by default
Element Caching: Inactive
Elementor Home Screen: Active by default
Elementor Editor Events: Inactive by default
Atomic Widgets: Inactive by default
Global Classes: Inactive by default
Enforce global classes capabilities: Active by default
Variables: Active by default
Cloud Library: Active by default
Editor v4 (Opt In Page): Active by default
Editor V4: Inactive by default
Import/Export Customization: Inactive by default
Menu: Inactive by default
== Log ==
Log: showing 20 of 412025-08-07 21:06:09 [info] Elementor/Upgrades - _on_each_version Start
2025-08-07 21:06:09 [info] Elementor/Upgrades - _on_each_version Finished
2025-08-07 21:06:09 [info] Elementor data updater process has been completed. [array (
'plugin' => 'Elementor',
'from' => '3.30.3',
'to' => '3.31.1',
)]
2025-08-07 21:06:09 [info] Elementor data updater process has been queued. [array (
'plugin' => 'Elementor',
'from' => '3.30.3',
'to' => '3.31.1',
)]
2025-08-13 21:18:53 [info] elementor-pro::elementor_pro_updater Started
2025-08-13 21:18:53 [info] Elementor Pro/Upgrades - _on_each_version Start
2025-08-13 21:18:53 [info] Elementor Pro/Upgrades - _on_each_version Finished
2025-08-13 21:18:53 [info] Elementor Pro/Upgrades - _v_3_30_0_post_navigation_inline_icons Start
2025-08-13 21:18:53 [info] Elementor Pro/Upgrades - _v_3_30_0_post_navigation_inline_icons Finished
2025-08-13 21:18:53 [info] Elementor data updater process has been completed. [array (
'plugin' => 'Elementor Pro',
'from' => '3.30.0',
'to' => '3.30.1',
)]
2025-08-13 21:19:05 [info] elementor::elementor_updater Started
2025-08-13 21:19:05 [info] Elementor/Upgrades - _on_each_version Start
2025-08-13 21:19:05 [info] Elementor/Upgrades - _on_each_version Finished
2025-08-13 21:19:05 [info] Elementor data updater process has been completed. [array (
'plugin' => 'Elementor',
'from' => '3.31.1',
'to' => '3.31.2',
)]
2025-08-13 21:19:05 [info] Elementor data updater process has been queued. [array (
'plugin' => 'Elementor',
'from' => '3.31.1',
'to' => '3.31.2',
)]
2025-08-13 21:19:14 [info] elementor-pro::elementor_pro_updater Started
2025-08-13 21:19:14 [info] Elementor Pro/Upgrades - _on_each_version Start
2025-08-13 21:19:14 [info] Elementor Pro/Upgrades - _on_each_version Finished
2025-08-13 21:19:14 [info] Elementor data updater process has been completed. [array (
'plugin' => 'Elementor Pro',
'from' => '3.30.1',
'to' => '3.31.2',
)]
2025-08-13 21:19:14 [info] Elementor data updater process has been queued. [array (
'plugin' => 'Elementor Pro',
'from' => '3.30.1',
'to' => '3.31.2',
)]
PHP: showing 2 of 2PHP: 2025-07-21 17:35:39 [warning X 2][/srv/htdocs/wp-content/plugins/elementor/modules/history/revisions-manager.php::363] Undefined array key "editor_post_id" [array (
'trace' => '
#0: Elementor\Core\Logger\Manager -> shutdown()
',
)]
PHP: 2025-07-28 18:01:58 [warning X 6][/srv/htdocs/wp-content/plugins/elementor-pro/core/app/modules/site-editor/data/endpoints/templates.php::150] Undefined array key "condition_type" [array (
'trace' => '
#0: /srv/htdocs/wp-content/plugins/elementor-pro/core/app/modules/site-editor/data/endpoints/templates.php(150): Elementor\Core\Logger\Manager -> rest_error_handler()
#1: ElementorPro\Core\App\Modules\SiteEditor\Data\Endpoints\Templates -> normalize_template_json_item()
#2: /srv/htdocs/wp-content/plugins/elementor-pro/core/app/modules/site-editor/data/endpoints/templates.php(120): class type array_map()
#3: /srv/htdocs/wp-content/plugins/elementor-pro/core/app/modules/site-editor/data/endpoints/templates.php(59): ElementorPro\Core\App\Modules\SiteEditor\Data\Endpoints\Templates -> normalize_templates_json()
#4: /srv/htdocs/wp-content/plugins/elementor/data/base/endpoint.php(156): ElementorPro\Core\App\Modules\SiteEditor\Data\Endpoints\Templates -> get_items()
',
)]
== Elementor - Compatibility Tag ==
Elementor Pro: Compatible
== Elementor Pro - Compatibility Tag ==
```
### Agreement
- [x] I confirm I have read and followed all the guidelines and instructions outlined in the Elementor Bug Report form.
- [x] I agree that my issue may be closed without further action if it doesn't meet all the requirements outlined in the Elementor Bug Report form.
Contributor guide
Assessment
This issue has not been assessed yet.