Accessibility for blind people - uiaccessibility

How does the aria-current works as we need to tell the screen reader where the page it is even after user does not made any movement on the laptop. Which Aria can be used ?

Aria-current works by informing the screen reader which element is current. For example, you can use aria-current="page" on a list of navigation links where it shows by visual decoration (color or underline, etc) which page link is currently chosen. Aria-current="step" could be used if there is a visual indication of checkout steps (for example) to show which step (2 of 3) the user is currently on. Aria-current="true" could be used if there are a set of size links to show which size is currently selected.

aria-current is one of the attributes defined in the WAI-ARIA specification, meant to help people with disabilities to perceive common UI widgets that are not part of the HTML specification.
It should be used to identify the current item in a set of items and it can take several values:
aria-current="page": indicates the current page within a set of pagination. It can be used, for example, within a main pagination widget (likely in the header).
aria-current="location": indicates the current page within an hierarchy of navigation. In can be used, for example, within a breadcrumb widget.
aria-current="date": indicates the current date. It can be used, for exemple, within a date picker.
aria-current="step": indicates the current step within a set of steps. It can be used, for exemple, within multi-step wizard form.

Related

Google pay pass Event Ticket CardTemplateOverride- Unable to hide TextModuleData which is used as a FieldReference

I am working on creating an EventPass to be saved to google pay.
I am following this link pass template to create EventPass.
I have succesfully created the Event by Overriding and making a few changes to the layout by using CardTemplateOverride but there are two issues which I am unable to resolve.
1.In CardTemplateOverride I have used FieldReferences of TextModuleData which I had created only for the purpose of showing in CardTemplateOverride. But I do not see a way to hide the TextModuleData which is also showing up at the bottom of the cards.
Could someone suggest a way to hide this textModuleData?
2.In CardTemplateOverride I have used CardRowOneItem, But it is center aligned as mentioned in the document. But my requirement is to have it left aligned and I do not see any option that allows me to do so.
From what I learnt so far the documentation, I do not see a way to do it. But I am not sure.
I have attached an Image Google Pay Event Pass that has been created. The canvas area in the center is a barcode which I have removed just for security concerns.
In the card area we have Date and Time which is referenced from the TextModuleData below the card. But I do not want to show the same information twice. Also the EntryInfo is center Aligned which I could not override and align it to the left.

Shopify - is it possible to change the preview of a product with a inputbox?

Which ways are possible to edit the live preview of the product page in Shopify with Inputboxes next to it?
Let's say the product is a poster, and i want to add a custom text on it.
When typing into the inputbox the text changes in real time on the product.
Can this be implemented in the shopify code with the basic version of shopify?
Or does this necessarily needs an app?
ADDITIONALLY:
Let me go a bit deeper. I have a code that can generate a QR code.
Now i want that the QR code to be previewed in the product. Now position and color of the QR code is different from any product. Would that need an app?
Yes you can to an extent.
First the ground rules:
You can't modify the product from the front-end and update the content or media in the back-end - this would be a huge security hole
The changes applied to the product will be visible only to the user who changed them
The solution is to use Javascript and update the content of the front-end. If you like to store the changes for that specific user you can save them as cookie or localstorage.
If you like to share this change to other people you will need to add a custom parameter in the URL of the page and generate the content from it and share that url.
Each one of these steps will require some custom Javascript that will affect only the user in question, if you like to modify the product in the back-end directly you will need some kind of an app for this.
On my mind it can be done if the dynamic text is applied over product image.
Detailed code would be too long to write here but here are the steps:
Add an input to your product form to add a custom property (https://community.shopify.com/c/Shopify-Design/Product-pages-Get-customization-information-for-products/td-p/616503)
Write a Javascript function to get input value in real time
Use this value to display it in a div in product image container
Position this div in CSS as absolute and style it as you wish
While image container position should be set as relative in CSS
HTH

Sensenet: Pagination on Document Library

It is possible to define pagination on document library?
I have a document library with more that 10000 documents... when I open the library occurs an timeout.
Actually SenseNet already does this! They just don't deliver it in the standard list control. If you open up the PRC and navigate to /Root/IMS/BuiltIn/Portal you'll see a list control with paging. The code can be found at /Root/Global/renderers/UserExploreGrid.ascx as User Control portlet. You can copy the code and change it to meet your needs.
Our company prefers to create User Control portlets and use Datatables with calls to the SenseNet OData API using skip and top to deliver pages.
Finally, given that SenseNet Content is stored as a tree structure (in SQL!), you can move the Content after creation so that data is organized hierarchically. A common solution is to take the first letter of the DisplayName and create a sub-folder from that letter, thereby reducing the number of items at a single node.
Here's what the paging looks like:
The short answer is no. Right now there isn't a built in functionality for that.
The long answer is that you can make a pagination yourself. One of the core member of sensenet made a grid where you can use pagination. It won't work with the current free to use releases because they lack the js files she used. But the idea behind it, is using a custom view. Which you can achieve by adding a system folder named Views under a the Document library and adding your custom view there.
You can use this grid for Explore, just follow these steps:
Go to the Explore action page, and switch editor mode on the PRC.
Place a ClientContext portlet (this can find under the Portlets->Application section in the portlet picker dialog) to the Wide column. Set portlet (client context porlet) properties, Apparance to None. It is a technical portlet, which allow get the CurrentContext in javascript. This is a very important element to work with this grid. The Grid use the client context.
Place a UserControlPortlet (In the portlet picker, Portlets->Application section) to the Wide Column.
Set portlet properties:
4.1. Portlet title: <%$ Resources: PortletTitles, Items%>
4.2. User Control path: /Root/Global/renderers/UserExploreGrid.ascx
Checkin Page modification on the PRC.
Enjoy your pageable explore portlet.
Keep in mind that this grid is specifically designed for users, so they will miss actions in the top menu. These must be handwritten. Then I suggest you copy the UserControl ( /Root/Global/renderers/UserExploreGrid.ascx)
and then put the action list on it . You can read more info about action list here: http://wiki.sensenet.com/ActionList
Br,
maros

In QTP how to identify if a web element is visible on the current visible browser window

On my full screen browser page the header is visible but the footer is not visible on the current window. To see the footer we needs to page down N times as the intermediate contents is populated when we page down (dynamically populate). So my problem is to know how many times i needs to page down to see the footer. Adding to this question, is it possible to know if an web element is below the current visible browser area ?
If you are using QTP for identifying and operating on the objects, you need not scroll down. Make sure that you are using strong locator properties (htmlId, ObjectId etc) for identifying the element and your code will work just fine. QTP works on the HTML source of the web page; so it is immaterial whether or not the element that you want to work on is visible or not. I am assuming there are no AJAX components here. With AJAX, you need to employ a different strategy.

Add dynamic tabs in tabbed property view of eclipse

I am trying to create a tabbed property view as per given article : The Eclipse Tabbed Properties View
As per article, org.eclipse.ui.views.properties.tabbed.propertyTabs extension point can be used to add new tabs.
<extension point="org.eclipse.ui.views.properties.tabbed.propertyTabs">
<propertyTabs contributorId="mview.views.SampleView">
<propertyTab
category="sample"
id="mview.ButtonTab"
label="Button"/>
<propertyTab
afterTab="mview.ButtonTab"
category="sample"
id="mview.AdvancedTab"
label="Advanced"/>
</propertyTabs>
</extension>
However in my case the tabs of property view vary depending on the item selected in view. So I have to add the tabs dynamically into extension depening on the item selected.
Please suggest how to do so.
Update:
One of the way to do so (I am not sure if its adviced) is using IExtensionRegistry.addContribution() method. Here I provided an inputstream object containing desired extension details. This added tabs to property view at run time. However with change in selection of item in list viewer, the property view is not updated. Please suggest if this is the right approach to do so.
Ok, I got the solution Its a two step process. Using this one can dyanamically add tabs (and their sections):
Step 1: Associate a tab descriptor provider with the view.
Add an extension point - org.eclipse.ui.views.properties.tabbed.propertyContributor to the view (if not already added). In the propertyContributor section, add a class for tabDescriptorProvider item. This class will implement ITabDescriptorProvider interface.
Step 2: Provide Tabs and Sections:
TabDescriptor provider will return array of TabDescriptors when its getTabDescriptor() method is called. Each TabDescriptor return a list of SectionDecriptors and each SectionDescriptor is linked to a Section. Finally it is the Section class that contains widgets to be displayed on screen. Each widget in Section class has a modify listner which updates the properties of selected items.
While the answer from Viral may not match the specific needs of the OP, the provided answer is likely acceptable to many.
If a tab does not have any sections to display, the default TabbedPropertySheetPage will not show that tab. Thus, if the problem domain is specified in terms of IFilter implementing classes, "dynamic" tabs may be achieved.
Tabs will be added or be removed as the selection changes depending upon whether any sections are present. A visible tab may have one or more sections present on it, and the number of sections on a visible tab may change from selection to selection.
As I came across this page with the same basic issue, I was a bit disappointed that I would need to intervene in the way the OP suggested. After some experimentation, I was able to achieve what I needed purely through the IFilter approach as suggested by Viral.
A tutorial is provided at http://www.eclipse.org/articles/Article-Tabbed-Properties/tabbed_properties_view.html
You need to define a new YourPropertySection derived fromAbstract PropertySection . Also define a filter derived from IFilter and override the select method to return true only for the desired type of selection. Then in plugin.xml write an extension point which would map your PropertySection to the required PropertyTab and will also associate your filter. So this section & tab will only show when your filter returns true.