Skip to content

Commit

Permalink
[4.1] jooa11y plugin options
Browse files Browse the repository at this point in the history
In the initial pull request the removal of some options went too far and stopped the remaining options from working. This resolves that.

This pr also changes the description of the containers to include examples of using classes, divs and roles

Before this PR none of the options were used. Now they are.
  • Loading branch information
brianteeman committed Mar 3, 2022
1 parent 4006e41 commit e8bd36c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions administrator/language/en-GB/plg_system_jooa11y.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

PLG_SYSTEM_JOOA11Y="System - Joomla Accessibility Checker"
PLG_SYSTEM_JOOA11Y_FIELD_CHECK_ROOT="Content Container"
PLG_SYSTEM_JOOA11Y_FIELD_CHECK_ROOT_DESC="Aria Landmark on the page that will be checked for accessibility. The default setting is <strong>main</strong>."
PLG_SYSTEM_JOOA11Y_FIELD_CHECK_ROOT_DESC="Landmark on the page that will be checked for accessibility. The default setting is the landmark <strong>main</strong>. Alternatives to landmarks are classes, elements or Aria roles (eg #example, .example, [role=example]."
PLG_SYSTEM_JOOA11Y_FIELD_CONTAINER_IGNORE="Ignore Regions"
PLG_SYSTEM_JOOA11Y_FIELD_CONTAINER_IGNORE_DESC="Ignore specific regions within the Content Container. Use commas to separate classes or elements (eg #ignore, .ignore)"
PLG_SYSTEM_JOOA11Y_FIELD_READABILITY_ROOT="Readability Container"
PLG_SYSTEM_JOOA11Y_FIELD_READABILITY_ROOT_DESC="Aria Landmark on the page that will be checked for readability. The default setting is <strong>main</strong>."
PLG_SYSTEM_JOOA11Y_FIELD_READABILITY_ROOT_DESC="Landmark on the page that will be checked for readability. The default setting is the landmark <strong>main</strong>. Alternatives to landmarks are classes, elements or Aria roles (eg #example, .example, [role=example]."
PLG_SYSTEM_JOOA11Y_FIELD_SHOW_ALWAYS="Show Always"
PLG_SYSTEM_JOOA11Y_FIELD_SHOW_ALWAYS_DESC="Load the accessiblity checker on all pages. This is useful when developing the website but should not be left on when the website is live."
PLG_SYSTEM_JOOA11Y_XML_DESCRIPTION="The Joomla Accessibility Checker visually highlights common accessibility and usability issues. Geared towards content authors, the plugin identifies errors or warnings and provides guidance on how to fix them."
Expand Down
11 changes: 11 additions & 0 deletions plugins/system/jooa11y/jooa11y.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,17 @@ public function initJooa11y()
// Detect the current active language
$lang = Factory::getLanguage()->getTag();


// Add plugin settings from the xml
$document->addScriptOptions(
'jooa11yOptions',
[
'checkRoot' => $this->params->get('checkRoot', 'main'),
'readabilityRoot' => $this->params->get('readabilityRoot', 'main'),
'containerIgnore' => $this->params->get('containerIgnore'),
]
);

// Add the language constants
$constants = [
'PLG_SYSTEM_JOOA11Y_ALERT_CLOSE',
Expand Down

0 comments on commit e8bd36c

Please sign in to comment.