I want to access the page.title or this.title but not as a string and instead as an element or anything other than a string in which I can then convert to a visual element.
The reason I want to do this is that I need to force move my accessibility to the top of the page but can't when this.title can only be referenced as a string. I know that page.title is accessible in iOS, and on Android it is accessible but instead highlights the whole page. (talk back and voice-over)
Is this possible? I have tried to do something similar by using Navigationpage.TitleView and then accessing the label inside of the title view which is label/view/visual element, but you can not place a titleview inside of master detail or flyout page. My page is a split view so contains its own title separate from the two pages nestled inside.
Related
I have an application-menu item that I added that contains a URI with a custom filter in attached to the page name (aka URI Querystring). I would like to have the page subtitle change to represent this filtered data on the page.
Has anyone done any work like this or have an easy way to set the page subtitle using the application-menu items?
Here is what is getting called in the browser:
<h1 class="oro-subtitle" id="grid-title-contacts-grid2073">All Contacts</h1>
Here is what is in the URI (decoded)
/contact?grid[contacts-grid]=i=1&p=25&s[lastName]=-1&s[firstName]=-1&f[__duplicate]=0&f[contactType][type]=1&f[contactType][value][]=PCM&c=id0.firstName1.lastName1.birthday0.gender0.email1.phone1.fax0.skype0.twitter0.facebook0.linkedIn0.googlePlus0.source1.countryName1.regionLabel1.addressPostalCode1.addressCity0.addressStreet0.createdAt1.updatedAt1.pictureFilename0.ownerName0.assignedName0.reportsName0.timesContacted0.timesContactedIn0.timesContactedOut0.lastContactedDate0.lastContactedDateIn0.lastContactedDateOut0.daysSinceLastContact0.contactType1.dateOfBirth1.PCMStatusContact1.tags1&v=all&a=grid
You can save the grid view and give it a custom title.
Here is the documentation on how to do that: https://doc.oroinc.com/user/back-office/getting-started/navigation/record-tables/#create-saved-table-views-grid-views
Then copy the URL for the page and use it for the menu item. It should now redirect to the saved view with your title.
I've inherited a project that uses a lot of click-triggered JS to change page content instead of linking to different actual HTML pages. I'm being asked to make JAWS read the page title when this happens, as if a new page is being loaded.
From my observations and a bit of light testing, reading the page title (meaning the contents of the <title> tag) is standard behavior for JAWS when linking to a new, separate page (as in a foo.html file), but not what happens when a same-page link or button is clicked.
How can I cause JAWS to read a page's title after a link or button is clicked that changes the existing page's content in a way that seems like a new page to the user but is actually the same file under the hood?
For this question, please assume that refactoring what I have to use an actual new page instead of JS content replacement is not an option. And if something is wrong with my initial assumptions, please let me know that as well.
It sounds like you have a single page app (SPA). You can't force the <title> element itself to be read but if you also put the same text into an aria-live="polite" container (a visually hidden <div> or <span> (*)), it'll be read.
You still want to update the title, even if it's not read, because the screen reader user can use a shortcut key (INS+T with jaws) to read the page title. And when the user switches between the browser and another app and then back again, they'll hear the title, so it's still important to update the title.
There are some decent blogs regarding accessible SPAs:
Accessible page titles in a Single Page App talks specifically
about the page title in SPAs
Building Accessible Single Page
Apps talks about general principles but doesn't really have any
code examples
Single page applications, Angular.js and accessibility talks specifically about using angular but the concepts and code examples can be applied generically.
(*) Note, when visually hiding the aria-live region, don't use CSS display:none because that'll hide it from the screen reader too. Use a sr-only type class. See What is sr-only in Bootstrap 3?
There's good info in slugolicious's answer. The specific issue has a simpler solution, though: <title> elements can be ARIA-ified.
<title role="banner" aria-live="polite">Default title here</title>
in conjunction with
$(function() {
// existing logic here
$(title).html("New title here");
});
being called when the new content loads.
I'm using a jQuery slider to display a series of images and none of them are showing in a Google image search, even though we rank at the top of normal search results for the relevant keyword. My suspicion is that Google is not indexing the images because they're being (lazy-)loaded into the slider with JavaScript via the data-image attribute. It is critical for performance purposes that I lazy-load the images and not use a set of standard <img> tags instead, so I'm trying to figure out the best way to serve the assets in a way that's more easily indexed by search engines. I'm considering using the <noscript> tag within the slide markup as follows:
<li class="slide" data-image="img/image.jpg">
<div class="caption">IMAGE INFO</div>
<noscript><img src="img/image.jpg" alt="Image info" width="x" height="x"></noscript>
</li>
I'm curious if there are any potential issues with this approach, or if something entirely different would be preferable? Will search engines still consider this markup relevant with respect to SEO if it's contained within <noscript> tags?
Thanks for any insight here.
The noindex tag is a solution, but not the best one.
I had the same problem, first I tried image sitemaps, then noindex tag and finally I found the best solution.
I wrote a blog post on this with a fully working example:
Lazy loading and the SEO problem, solved!
The best solution is to use the method provided by Google to index AJAX contents. But it is not limited to AJAX, in fact you can use it on any dynamically generated content.
In my sample I use this method for an image gallery that loads images dynamically.
In a few words you have to use escaped fragments.
A fragment is the last part of the URL, prefixed by #. Fragments are not propagated to the server, they are used only on the client side to tell the browser to show something, usually to move to a in-page bookmark.
If instead of using # as the prefix, you use #!, this instructs Google to ask the server for a special version of your page using an ugly URL. When the server receives this ugly request, it's your responsibility to send back a static version of the page that renders an HTML snapshot (the not indexed image in our case).
I generate HTML snapshots on the server side using ASP.NET (but you can generate them with any technology).
var fragment = Page.Request.QueryString["_escaped_fragment_"];
if (!String.IsNullOrEmpty(fragment))
{
var escapedParams = fragment.Split(new[] { '=' });
if (escapedParams.Length == 2)
{
var imageID = escapedParams[1];
// Render the page with the gallery showing the requested image (statically!)
...
}
}
The drawback of noscript tags method is that you provide a poor user experience, in fact the user is not able to bookmark the page showing a specific image.
Using fragments and JavaScript you give users the best experience
if (window.location.hash)
{
// NOTE: remove initial #
var fragmentParams = window.location.hash.substring(1).split('=');
var imageToDisplay = fragmentParams[1]
// Render the page with the gallery showing the requested image (dynamically!)
...
}
I have a site with an "About us" page which is divided into multiple sections.
About Us
+Overview
+The Company
+Our services
+Future plans
(etc)
I want to have a floated block on the right hand side of each of these pages which contains links to every other page.
Ideally, what I would like is to create a page titled AboutUsSidebar, and then be able to include this page in all of the about sections through some kind of tag, ie..
{include('Sidebar')}
Is there anything like this in PyroCMS? Or perhaps a better way to do it?
You should use view partials.
Create your sidebar with it's HTML and save it into addons/shared_addons/themes/yourtheme/views/partials/sidebar.html and then you can include it in your layouts as so:
{{ theme:partial name="sidebar" }}
It looks like page types are the way to go, I didn't see the page types button at the top of the page before.
In the end what I was able to achieve the desired result by using a page type.
I have a page type called "About" which contains the sidebar html, then I use pages on top of that page type for each of the sections.
Worked very nicely.
How can I change the body bg color to and specific article in Joomla?
We accomplish exactly this for a scientific site by specifying the Page Class Suffix when creating a menu item for the article. It's located on the menu option page under Parameters (System), and whatever string you put in there is appended to the class of the page. From there, your CSS skills and Firebug will be your friend to add your class and make changes in the appropriate CSS files.