Mô tả
The AccessiTrans – ARIA Translator for WPML & Elementor plugin facilitates the translation of ARIA attributes in sites developed with Elementor and WPML, ensuring that accessibility information is available in all languages of your website.
Key Features
- Automatically detects and makes ARIA attributes available for translation
- Fully integrated with WPML String Translation
- Compatible with all Elementor elements and templates
- Multiple capture methods to ensure comprehensive detection
- Translation retry mechanism for failed translations
- Force refresh function to clear all caches
- Debug mode for troubleshooting
- Performance optimization settings
- Translation cache system for improved performance
- Internationalization support
Compatible ARIA attributes
The plugin allows you to translate the following attributes:
aria-label
: To provide an accessible name for an elementaria-description
: To provide an accessible descriptionaria-roledescription
: To customize the role description of an elementaria-placeholder
: For placeholder text in input fieldsaria-valuetext
: To provide textual representation of numeric values
Capture Methods
The plugin offers several capture methods to ensure that all ARIA attributes are detected:
- Full HTML Capture: Captures all HTML of the page (highly effective but may affect performance)
- Elementor Content Filter: Processes content generated by Elementor
- Elementor Template Processing: Processes Elementor template data
- Individual Element Processing: Processes each Elementor widget individually
Advanced Settings
- Retry Failed Translations: Automatically retries translations that failed on first attempt
- Debug Mode: Enables detailed event logging
- Admin-Only Capture: Limits resource-intensive capture methods to admin users
- Capture in Primary Language Only: Only captures strings when browsing in the default language
Compatibility
Works with all types of Elementor content:
- Regular pages
- Templates
- Global sections
- Headers and footers
- Popups and other dynamic elements
Tested with:
* WordPress 6.8
* Elementor 3.28.4
* WPML Multilingual CMS 4.7.4
* WPML String Translation 3.3.3
Why this plugin matters for accessibility
In multilingual websites, accessibility information should be available in all languages. ARIA attributes provide essential accessibility information that helps assistive technologies understand and navigate your website. By making these attributes translatable, you ensure that all users, regardless of language or ability, can access your content effectively.
Usage Instructions
How to add ARIA attributes in Elementor
- Edit any element in Elementor
- Go to the “Advanced” tab
- Find the “Custom Attributes” section
- Add the ARIA attributes you want to translate
Compatible formats
Elementor indicates: “Set custom attributes for the wrapper element. Each attribute in a separate line. Separate attribute key from the value using |
character.”
You can add ARIA attributes in two ways:
Basic format (one attribute per line):
aria-label|Text to translate
Multiline format (multiple attributes):
aria-label|Text to translate
aria-description|Another description
This will generate the corresponding HTML attributes in the frontend:
aria-label=”Text to translate” aria-description=”Another description”
How to translate the attributes
- Once you’ve added the attributes, save the page or template
- Go to WPML String Translation
- Filter by the “AccessiTrans ARIA Attributes” context
- Translate the strings as you would with any other text in WPML
Best practices for optimal performance
For the best experience and website performance, follow these recommendations:
-
Browse your site in the primary language only while generating strings for translation. This prevents registering duplicate strings.
-
Use the Force Refresh function when translations aren’t appearing as expected.
-
Disable capture methods after initial setup:
- Once you’ve captured all ARIA attributes for translation, we recommend disabling all capture methods
- This improves site performance and prevents additional strings from being registered in WPML
- Re-enable the capture methods temporarily when you make changes to your site that include new ARIA attributes
Practical examples
For a menu button:
* Attribute: aria-label|Open menu
For a phone link:
* Attribute: aria-label|Call customer service phone
For an icon without text:
* Attribute: aria-label|Send an email
For a slider:
* Attribute: aria-label|Image gallery
* Attribute: aria-description|Navigate through product images
Author
Developed by Mario Germán Almonte Moreno:
- Member of IAAP (International Association of Accessibility Professionals)
- CPWA Certified (CPACC and WAS)
- Professor in the Digital Accessibility Specialization Course (University of Lleida)
- 20 years of experience in digital and educational fields
Ảnh màn hình
Configuration interface showing different capture methods and settings Elementor’s Advanced tab showing where to add custom ARIA attributes Code transformation process showing how ARIA attributes are processed WPML String Translation interface displaying ARIA attributes ready for translation Diagnostic tools interface for troubleshooting translations Settings interface with activation options for capturing methods
Cài đặt
- Install the plugin via the WordPress.org plugin repository, or upload the files to the
/wp-content/plugins/accessitrans-aria/
directory - Activate the plugin through the ‘Plugins’ menu in WordPress
- Go to Settings AccessiTrans to configure the plugin options
- Configure ARIA attributes in Elementor (see usage instructions)
Hỏi đáp
-
Does it work with other page builders besides Elementor?
-
No, currently the plugin is specifically designed to work with Elementor.
-
Is it compatible with the latest version of WPML?
-
Yes, the plugin has been tested with version 4.7.4 of WPML Multilingual CMS and 3.3.3 of WPML String Translation.
-
Why do I see duplicate entries in WPML String Translation?
-
The plugin registers strings using different formats to ensure maximum compatibility with all types of Elementor content. You only need to translate each unique text once.
-
Will this plugin slow down my website?
-
The plugin includes several performance optimization options. By default, the most resource-intensive capture method (Full HTML Capture) only runs for admin users. You can adjust these settings in the plugin’s configuration page.
-
Can I use this plugin with Elementor Free?
-
Yes, the plugin works with both Elementor Free and Elementor Pro.
-
What should I do if translations aren’t working correctly?
-
Try using the “Force Refresh” button in the plugin settings. This will clear all caches and reinitialize the translation system.
-
Do I need to keep all capture methods enabled?
-
No. It’s recommended to enable all methods during the initial setup to capture all ARIA attributes. After that, you can disable them to improve performance and only re-enable when adding new ARIA attributes to your site.
-
How do I know if the ARIA attributes are being translated correctly?
-
You can verify this by:
1. Adding ARIA attributes in Elementor
2. Translating them in WPML String Translation
3. Switching to a different language on your frontend
4. Inspecting the element with browser developer tools to see if the translated text appears -
Does this work with Elementor global widgets and templates?
-
Yes, the plugin works with all types of Elementor content, including global widgets, templates, and dynamic elements.
Đánh giá
Không có đánh giá nào cho plugin này.
Người đóng góp & Lập trình viên
“AccessiTrans – ARIA Translator for WPML & Elementor” là mã nguồn mở. Những người sau đã đóng góp vào plugin này.
Những người đóng góp“AccessiTrans – ARIA Translator for WPML & Elementor” đã được dịch qua 1 ngôn ngữ. Cảm ơn những người tham gia dịch vì đóng góp của họ.
Dịch “AccessiTrans – ARIA Translator for WPML & Elementor” sang ngôn ngữ của bạn.
Muốn tham gia phát triển?
Duyệt code, check out SVN repository, hoặc theo dõi nhật ký phát triển qua RSS.
Nhật ký thay đổi
1.0.5
- Translated one more string
1.0.4
- Translated two missing strings
1.0.3
- Internationalization improvements: Updated all plugin strings to English to comply with WordPress.org guidelines
- Made plugin fully compatible with WordPress.org translation system
- Improved translation workflow for better language support
- Minor code refinements for better maintainability
1.0.2
- Security fix: Implemented sanitize_callback in register_setting()
- Improved sanitization structure to follow WordPress best practices
1.0.1
- Security improvement: Implemented proper input sanitization
- Optimized logging system for production environments
- Tested with WPML 4.7.4 and String Translations 3.3.3
- Fixed register_setting() usage for better security
- Implemented proper JavaScript and CSS enqueuing
- Removed inline scripts and styles from PHP code
- Created assets/css and assets/js folder structure
- Extracted styles to admin-styles.css and scripts to admin-scripts.js
- Implemented wp_enqueue_style() and wp_enqueue_script()
- Used wp_localize_script() to pass variables to JavaScript
- Fixed file/directory location:
- Replaced direct use of WP_CONTENT_DIR for log files
- Implemented wp_upload_dir() to determine correct location
- Created specific ‘accessitrans-logs’ directory in uploads
- Removed load_plugin_textdomain():
- Removed unnecessary function since WordPress 4.6+
- Maintained /languages folder structure for translations
- Updated documentation
1.0.0
- First public release
- Corrected and updated translation files
- Ready for WordPress.org repository
0.2.5
- Added main toggle to enable/disable scanning for new strings
- Improved the entire admin interface with accessible semantic structure
- Implemented screen reader announcements for interactive processes
- Redesigned the interface using fieldset/legend replacing tables
- Enhanced visual styles and activation/deactivation of dependent fields
- Optimized performance when scanning is disabled
0.2.4
- Improved language verification system for string capture
- Implemented robust system to prevent duplicates in WPML
- Optimized cache system with enhanced persistence and size control
- Fixed issue with duplicate entries in the diagnostics tool
- Improved overall performance by reducing database queries
0.2.3
- Restructuring of the plugin’s file system
0.2.3
- Added persistent translation cache system to improve performance
- Enhanced translation lookup algorithm with multiple fallback methods
- Improved accessibility of admin interface for screen readers
- Added diagnostics tool to troubleshoot translation issues
- Fixed issues with attribute detection in complex templates
0.2.2
- Added detection of aria-valuetext attribute
- Improved support for Elementor templates and global widgets
- Enhanced compatibility with latest versions of WPML and Elementor
0.2.1
- Fixed issues with string registration in specific contexts
- Improved error handling and debug logging
- Minor UI improvements in settings page
0.2.0
- Added translation retry mechanism for failed translations
- Added force refresh button to clear all caches
- Enhanced debugging information with detailed logging
- Improved compatibility with WordPress 6.8
0.1.0
- Improved accessibility of the configuration page
- Enhanced semantic structure with proper ARIA landmarks
- Improved page title for better identification
- Added proper section elements with semantic headings
0.0.0
- Initial release with core functionality
- Support for translating aria-label, aria-description, aria-roledescription and aria-placeholder
- Multiple capture methods for comprehensive detection
- Integration with WPML String Translation
- Admin settings page for configuration
- Debug mode for troubleshooting
- Compatibility with all Elementor content types