Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions administrator/language/en-GB/plg_system_skipto.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,29 @@
; Note : All ini files need to be saved as UTF-8

PLG_SYSTEM_SKIPTO="System - Skip-To Navigation"
PLG_SYSTEM_SKIPTO_CONTENT="Content"
PLG_SYSTEM_SKIPTO_PAGE_OUTLINE="Page Outline"
PLG_SYSTEM_SKIPTO_ACCESS_KEY_NOT_SUPPORTED="The use of Access keys is not supported on this browser."
PLG_SYSTEM_SKIPTO_HEADING_IMP="Page Outline"
PLG_SYSTEM_SKIPTO_HEADING_LEVEL="Heading level"
PLG_SYSTEM_SKIPTO_HEADING_NONE="No headings to skip to"
PLG_SYSTEM_SKIPTO_LANDMARK_ASIDE="Aside"
PLG_SYSTEM_SKIPTO_LANDMARK_FOOTER="Footer"
PLG_SYSTEM_SKIPTO_LANDMARK_FORM="Form"
PLG_SYSTEM_SKIPTO_LANDMARK_HEADER="Header"
PLG_SYSTEM_SKIPTO_LANDMARK_IMP="Landmarks"
PLG_SYSTEM_SKIPTO_LANDMARK_MAIN="Main"
PLG_SYSTEM_SKIPTO_LANDMARK_NAV="Navigation"
PLG_SYSTEM_SKIPTO_LANDMARK_NONE="No landmarks to skip to"
PLG_SYSTEM_SKIPTO_LANDMARK_SEARCH="Search"
PLG_SYSTEM_SKIPTO_MENU="Landmarks and Page Outline"
PLG_SYSTEM_SKIPTO_SECTION="Site Section"
PLG_SYSTEM_SKIPTO_SECTION_ADMIN="Administrator (Backend)"
PLG_SYSTEM_SKIPTO_SECTION_BOTH="Both"
PLG_SYSTEM_SKIPTO_SECTION_SITE="Site (Frontend)"
PLG_SYSTEM_SKIPTO_SKIP_TO="Skip To"
PLG_SYSTEM_SKIPTO_SKIP_TO_AND_PAGE_OUTLINE="Skip To and Page Outline"
PLG_SYSTEM_SKIPTO_SKIP_TO_KEYBOARD="Skip To Keyboard Navigation"
PLG_SYSTEM_SKIPTO_TITLE="Keyboard Navigation"
; do not translate $key
PLG_SYSTEM_SKIPTO_TITLE_WITH_ACCCESS_KEY="Keyboard Navigation - Access key is $key"
PLG_SYSTEM_SKIPTO_XML_DESCRIPTION="The plugin creates a dropdown menu consisting of the links to the important places on a given web page. This makes it easier for keyboard and screen reader users to quickly jump to the desired location by choosing it from the list of options."



17 changes: 4 additions & 13 deletions build/build-modules-js/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -548,30 +548,21 @@
"name": "skipto",
"licenseFilename": "LICENSE.md",
"js": {
"src/js/skipTo.js": "js/skipTo.js",
"src/js/dropMenu.js": "js/dropMenu.js"
"src/js/skipto.js": "js/skipto.js"
},
"css": {
"src/css/SkipTo.css": "css/SkipTo.css"
"src/css/skipTo.css": "css/skipTo.css"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the case is changed we need #31804 first and add the corresponding files to the rename function

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still up in the air until upstream fixes their npm etc.

They do the css differently to the way we did it so this line will probably be deleted anyway

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK but the changed the .js file too

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes I know. I cant do anything about it until they fix their end

},
"provideAssets": [
{
"name": "skipto",
"type": "style",
"uri": "SkipTo.css"
},
{
"name": "skipto.dropmenu",
"type": "script",
"uri": "dropMenu.js",
"attributes": {
"defer": true
}
"uri": "skipTo.css"
},
{
"name": "skipto",
"type": "script",
"uri": "skipTo.js",
"uri": "skipto.js",
"attributes": {
"defer": true
}
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"qrcode-generator": "^1.4.4",
"roboto-fontface": "^0.10.0",
"short-and-sweet": "^1.0.2",
"skipto": "^2.1.1",
"skipto": "^3.1.0",
"tinymce": "^5.6.1",
"vue": "^2.6.12",
"vue-focus-lock": "^1.3.2",
Expand Down
45 changes: 32 additions & 13 deletions plugins/system/skipto/skipto.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,24 +52,45 @@ public function onAfterDispatch()
return;
}

// Are we in a modal?
if ($this->app->input->get('tmpl', '', 'cmd') === 'component')
{
return;
}

// Load language file.
$this->loadLanguage();

// Add strings for translations in JavaScript.
// Add strings for translations in JavaScript and other plugin settings.
$document->addScriptOptions(
'skipto-settings',
[
'settings' => [
'skipTo' => [
'buttonDivRole' => 'navigation',
'buttonDivLabel' => Text::_('PLG_SYSTEM_SKIPTO_SKIP_TO_KEYBOARD'),
'buttonLabel' => Text::_('PLG_SYSTEM_SKIPTO_SKIP_TO'),
'buttonDivTitle' => '',
'menuLabel' => Text::_('PLG_SYSTEM_SKIPTO_SKIP_TO_AND_PAGE_OUTLINE'),
'landmarksLabel' => Text::_('PLG_SYSTEM_SKIPTO_SKIP_TO'),
'headingsLabel' => Text::_('PLG_SYSTEM_SKIPTO_PAGE_OUTLINE'),
// The following string begins with a space
'contentLabel' => ' ' . Text::_('PLG_SYSTEM_SKIPTO_CONTENT'),
'colorTheme' => 'joomla',
'displayOption' => 'popup',
'accesskey' => '9',
'customClass' => 'joomla',
'enableActions' => false,
'enableHeadingLevelShortcuts' => false,
'headings' => 'h1, h2, h3',
'landmarks' => 'main, nav, search, aside, header, footer, form',
'accesskeyNotSupported' => Text::_('PLG_SYSTEM_SKIPTO_ACCESS_KEY_NOT_SUPPORTED'),
'asideLabel' => Text::_('PLG_SYSTEM_SKIPTO_LANDMARK_ASIDE'),
'buttonLabel' => Text::_('PLG_SYSTEM_SKIPTO_SKIP_TO'),
'buttonTitle' => Text::_('PLG_SYSTEM_SKIPTO_TITLE'),
'buttonTitleWithAccesskey' => Text::_('PLG_SYSTEM_SKIPTO_TITLE_WITH_ACCCESS_KEY'),
'footerLabel' => Text::_('PLG_SYSTEM_SKIPTO_LANDMARK_FOOTER'),
'formLabel' => Text::_('PLG_SYSTEM_SKIPTO_LANDMARK_FORM'),
'headerLabel' => Text::_('PLG_SYSTEM_SKIPTO_LANDMARK_HEADER'),
'headingImportantGroupLabel' => Text::_('PLG_SYSTEM_SKIPTO_HEADING_IMP'),
'headingLevelLabel' => Text::_('PLG_SYSTEM_SKIPTO_HEADING_LEVEL'),
'landmarkImportantGroupLabel' => Text::_('PLG_SYSTEM_SKIPTO_LANDMARK_IMP'),
'mainLabel' => Text::_('PLG_SYSTEM_SKIPTO_LANDMARK_MAIN'),
'msgNoHeadingsFound' => Text::_('PLG_SYSTEM_SKIPTO_HEADING_NONE'),
'msgNoLandmarksFound' => Text::_('PLG_SYSTEM_SKIPTO_LANDMARK_NONE'),
'navLabel' => Text::_('PLG_SYSTEM_SKIPTO_LANDMARK_NAV'),
'searchLabel' => Text::_('PLG_SYSTEM_SKIPTO_LANDMARK_SEARCH'),
]
]
]
Expand All @@ -78,12 +99,10 @@ public function onAfterDispatch()
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $document->getWebAssetManager();
$wa->useStyle('skipto')
->useScript('skipto.dropmenu')
->useScript('skipto')
->addInlineScript(
'document.addEventListener(\'DOMContentLoaded\', function() {'
. 'window.SkipToConfig = Joomla.getOptions(\'skipto-settings\');'
. 'window.skipToMenuInit();});',
. 'window.SkipToConfig = Joomla.getOptions(\'skipto-settings\');});',
[],
['type' => 'module'],
['skipto']
Expand Down