access key navigation
Permalink 1 user found helpful
Not sure if this would be a block or not but has anybody integrated access keys for the autonav block. I have done a proposal for a charity and in their brief they have requested access keys for accessibility purposes. I have done them before on a static site but was just wondering if it can/has been done using Concrete.
Thanks in advance
Karl
Thanks in advance
Karl
it can, you will have to make a few custom templates though, but it shouldn't be to hard for you since youv already done it
"you will have to make a few custom templates though"
What does that mean?
What does that mean?
I would create a custom attribute for your pages called AccessKey and then in your custom AutoNav templates you could call that attribute in to the link tag if it's been set.
Id' like a nice solution for this too, currently I add a div with access just after the opening Body tag and have it set to hidden, then have title assigned to those links.
I was thinking of having a go at creating a block but I think Lucas is right a custom attribute could be a better way to go about this,
I would be tempted to add in two attributes though,
One for the Access Key and one for the Title.
Let me have a play and see what I can come up with.
(I know this is quite an old thread but I would like to see something like this to help save time each time I do a site.)
I was thinking of having a go at creating a block but I think Lucas is right a custom attribute could be a better way to go about this,
I would be tempted to add in two attributes though,
One for the Access Key and one for the Title.
Let me have a play and see what I can come up with.
(I know this is quite an old thread but I would like to see something like this to help save time each time I do a site.)
hmm this is what I have come up with,
I have removed the title attribute as I want to use the Page name and always use "go to {page_name} page"
I also use a display of hidden in my main style sheet to stop it being displayed on screen and print. Not tested on screen readers but they should pick it up?
I have just edited one of the autonav templates but it does what I need it to do now hope it helps someone else out.
I have removed the title attribute as I want to use the Page name and always use "go to {page_name} page"
I also use a display of hidden in my main style sheet to stop it being displayed on screen and print. Not tested on screen readers but they should pick it up?
I have just edited one of the autonav templates but it does what I need it to do now hope it helps someone else out.
<?php defined('C5_EXECUTE') or die("Access Denied."); $aBlocks = $controller->generateNav(); $c = Page::getCurrentPage(); $i = 0; echo ("<!-- access keys - UK government accesskeys system --> "); echo("\r\n<div id=\"access-keys\">"); //$nh = Loader::helper('navigation'); //$isFirst = true; foreach($aBlocks as $ni) { $_c = $ni->getCollectionObject(); if (!$_c->getCollectionAttributeValue('exclude_nav') && $_c->getCollectionAttributeValue('access_key')) { $target = $ni->getTarget(); if ($target != '') { $target = 'target="' . $target . '"';
Viewing 15 lines of 41 lines. View entire code block.
Did not work for me, only gave a skip link?
It seems a little strange that after more than twelve months, the two posts about access keys has not been resolved?
Until now!
Eureka I did it!
I made it work!
This is what I've done.
In Dashboard - Pages and Themes - Page Attributes add two Text attributes called 'Title' and 'AccessKey' - see screen shots.
You will need access to your server directory, in the root find the blocks folder, then create another folder called autonav.
Create new file in the autonav folder called view.php and paste my code.
No need for custom templates or any fancy footwork.
I'm not a developer in the true sense, but I do try to fiddle with code.
Thanks to Lucas for suggesting Attributes and Sean for his code that I played with.
I persevered for two days and I think I cracked it!
If anybody else tries it and it works for them as well perhaps it could go in the core?
Let me what you think
Until now!
Eureka I did it!
I made it work!
This is what I've done.
In Dashboard - Pages and Themes - Page Attributes add two Text attributes called 'Title' and 'AccessKey' - see screen shots.
You will need access to your server directory, in the root find the blocks folder, then create another folder called autonav.
Create new file in the autonav folder called view.php and paste my code.
No need for custom templates or any fancy footwork.
I'm not a developer in the true sense, but I do try to fiddle with code.
Thanks to Lucas for suggesting Attributes and Sean for his code that I played with.
I persevered for two days and I think I cracked it!
If anybody else tries it and it works for them as well perhaps it could go in the core?
Let me what you think
<?php defined('C5_EXECUTE') or die("Access Denied."); $aBlocks = $controller->generateNav(); $c = Page::getCurrentPage(); $containsPages = false; $nh = Loader::helper('navigation'); //this will create an array of parent cIDs $inspectC=$c; $selectedPathCIDs=array( $inspectC->getCollectionID() ); $parentCIDnotZero=true; while($parentCIDnotZero){ $cParentID=$inspectC->cParentID; if(!intval($cParentID)){ $parentCIDnotZero=false; }else{
Viewing 15 lines of 75 lines. View entire code block.
Next step applying title and access keys to existing pages.
Either from the Dashboard - Sitemap choose your page or any page in edit mode.
Choose Properties - Custom Attributes - Add Attribute - choose Title and AccessKey.
Fill in the attributes and save - see screen shots.
Now when you add the autonav you should see Title and AccessKey.
Same applies when adding new pages.
So now it is time to go around all websites and apply this to the autonav
Hope this works for you.
Either from the Dashboard - Sitemap choose your page or any page in edit mode.
Choose Properties - Custom Attributes - Add Attribute - choose Title and AccessKey.
Fill in the attributes and save - see screen shots.
Now when you add the autonav you should see Title and AccessKey.
Same applies when adding new pages.
So now it is time to go around all websites and apply this to the autonav
Hope this works for you.
I'm sorry,
Is this not important?
Is this not important?
:)
I've never missed not having this feature. I can see where it could be helpful however so I followed and "earmarked" the thread for future use.
THX
I've never missed not having this feature. I can see where it could be helpful however so I followed and "earmarked" the thread for future use.
THX