I searched but could not find an up-to-date question, so here goes:
Could someone let me know what Xcodes Accessibility Label vs Hint vs Id are used for? I think it might be label and hint are used for voiced navigation and Id's are only used for automation, but not sure if that is right?
You are correct.
The 'Label' property will be used in voice over representing the element itself. If Labels are not set manually, they will be filled in at runtime based on the content of the element. IE: "Comment Delete Button"
'Hints' are also used in voice over assistance but are a more descriptive representation of the element. IE: "This button allows users to delete a comment."
'identifier' is used for automation and quick query of the UI element.
IE: "CommentDeleteButton"
The Label and Hint can be localized and therefore will vary between languages while the identifier remains the same.
https://developer.apple.com/library/content/documentation/UserExperience/Conceptual/iPhoneAccessibility/Accessibility_on_iPhone/Accessibility_on_iPhone.html#//apple_ref/doc/uid/TP40008785-CH100-SW1
Related
My company is trying to become WCAG compliant. One of the things we need to do is add aria-label to interactive elements. My question is do I need to add an aria-label to an element which already has a label which is read by a screen reader.
So basically i definitely need a "close" aria-label here:
<button>x</button>
But in some cases I have a placeholder for example, which is read by the screen reader. Do I need to add an aria-label anyway just in case? The aria-label would be the same as the placeholder.
#mikkel has good advice regarding the first rule of ARIA use.
Regarding your specific question on the placeholder attribute, relying on the placeholder as your label would fail several WCAG checkpoints.
Placeholder text is typically light gray and when displayed on a white background often fails 1.4.3 Contrast Minimum
The placeholder text disappears when you start typing so now the "label" has disappeared and would fail 3.3.2 Labels or Instructions
The placeholder attribute is not specifically referenced in the accessible name calculation (https://www.w3.org/TR/accname-1.1/#step2) although it might be considered in step 2D as "an attribute that defines a text alternative". It's not clear if placeholder is a "text alternative". Personally, I don't think it is. If not, then you would fail 4.1.2 Name, Role, Value
If you look at the spec for placeholder, it has a big disclaimer about not using it as a label.
Warning: Use of the placeholder attribute as a replacement for a label can reduce the accessibility and usability of the control for a range of users including older users and users with cognitive, mobility, fine motor skill or vision impairments. While the hint given by the control’s label is shown at all times, the short hint given in the placeholder attribute is only shown before the user enters a value. Furthermore, placeholder text may be mistaken for a pre-filled value, and as commonly implemented the default color of the placeholder text provides insufficient contrast and the lack of a separate visible label reduces the size of the hit region available for setting focus on the control.
So, all that being said, yes, you should have some kind of visible label associated with your input field even if you are using the placeholder attribute.
Short answer, no.
Long answer, it depends on the situation.
But important – first rule of aria:
If you can use a native HTML element or attribute with the semantics and behavior you require already built in, instead of re-purposing an element and adding an ARIA role, state or property to make it accessible, then do so.
When in doubt, choose native HTML.
https://www.w3.org/TR/using-aria/#rule1
If you have a visible label, then you should connect the label text and the input field via the label-element.
If the input field does not have a visible label, the aria-label is one technique that can add the label semantically.
In your example of the button, you should use an aria-label, as the "X" doesn’t give the user any information. Of course, most users can guess what an "x" dos, but the user should not have to guess.
And here am talking of users who use assistive technology.
I would recement that you get a professional to test your site, for legal reasons but mostly for your users.
I'm a web developer, but have used the last 10 years on web accessibility. So far, it’s the hardest field of web development I hav had to learn and I'm still learning. 😊
I've tried nearly anything, The "Type Into" activity won't print plain text into the text box let alone a held variable. The textbox element in question is the update work items comment box in the acme-test website from the Level 3 RPA developer course. I am able to type into the box manually and the robot is able to find it (the cursor moves to the centre of the text box and the program continues). I've tried quite a lot, including using a click activity and then sending the string as hotkeys.
Most probably the issue is related to your selectors. Since you are on level 3 RPA developer course I assume you are using Reframework for the task and I believe because of comprehensive error handling capabilities of this template your application just continuous with the next item instead of crashing when it can't find the element.
To solve the selector issues I usually do the following:
Use partial selectors instead of full selectors
Use wildcards for dynamic parts of your selectors (* for replacing any number of characters, ? for replacing exactly 1 character)
You can also store the page you are working on in a Uipath.Core.Browser type variable to eliminate the need of reselecting browser.
Also keep in mind that if you have used basic recorder functionality of UI path it generates full selectors.
in a List view I want a particular control (textbox) to have a red background color if it has a certain value. I have tried the following:
Click on the textbox then click the Data icon in the context sensitive controls that appear. I can then see that the name of the control is First_NameTextBox. I then click anywhere on the List view and click the Actions icon in the context controls that appear to the right of the view. I select "On Current". I then create two steps that should be executed whenever a new record is activated:
If [First_NameTextBox] = "somevalue" Then
SetProperty
Control Name [First_NameTextBox]
Property BackColor
Value #FF0000
End If
However, this turns the textbox red no matter what the value in First_NameTextBox is. How do I reference the CURRENT value of the textbox?
Conditional formatting based on a field value is not available for the List View in a Web App.
If you've built web pages (with or without a templating engine), the design limitations of Access can be frustrating.
Another kind of frustration comes from moving a form in Access from the native Access environment to a browser-based display.
I've felt the first kind of frustration, but so far I've avoided the second kind. I keep MS Access and HTML-rendered forms far away from each other.
Conditional Formatting in the List View of Access Web Apps is Available its just way harder than it should be.
Input "If Statement" under the "Current Macro" by clicking outside any text box or label then traveling to the top right of the view and you will see the Lightning bolt which allows two options, "On Load" and "On Current".
SELECT ON CURRENT
Don't forget You will need to set the control back to the original color by using the else. (also, for some reason I have to flip the Colors so where you would think red would go, Put White.
Example:
IF = "" True Then
White
Else
Red
END IF /DONT ASK ME WHY!
Summary: your Code is Sound, Just input it under the Views Current Macro Location
This is my first post, i spent DAYS looking for this information and found in the deep google somewhere so i hope this helps you.
I have an application that displays a dialog when the user needs to enter information. The reason for this, is to keep the main form readonly, and only when you need to add/edit data will a dialog appear.
The problem I'm wrestling with is what to display for the label names in the dialog. The application is a WPF desktop app and traditionally desktop apps are very short on label names (usually one or two words). I want to make the dialog user friendly and be more descriptive about the information that is required. Web developers seem to be catching on to this and are much more descriptive with their label names, but most of the forms I've looked at are forms that are only filled in once, whereas I will have data that can be edited.
An example: If I had a label that asked a user if an employee smoked, in most a destop apps the label would normally be something like 'Smokes?' with a checkbox, whereas I want something like 'Does the employee smoke?'. My issue with this is, that the first time you come across this dialog and enter the data, then it seems OK, but what about when you are editing data that is already there. Does this label now make any sense. Past tense and present tense seem to be getting in my way and I was interested in what people think or ways they have approached this. The application I'm writing is a WPF app and I feel that traditional label names are a bit old in the tooth now.
Another example would be entering contact details for a person. Do I just have labels that say Phone, Fax, Email or something more descriptive. i.e. a label that appears before the textboxes stating 'Enter the contact details below' and then the single word labels?
Maybe I'm just being pedantic about all this, but I would like to take a step forward so that my application contains more than single word labels that are sometimes unclear to the user about what is required.
Why not make use of the concise labels and use Tool tips for a longer explanation.
The longer explanation is only required when a user is unfamiliar with the application anyway.
Also, you could re-word a label to make it sound more like a question such as "Is a Smoker?"
Since you are using Stack Overflow, take note of their use of tooltips, I think Jeff Attwood has a blog post or comments in a podcast about the use of tooltips in SO. I can't remember where I heard / read it.
Have you thought about creating a "quickstart" flow or wizard for entering data for the first time? This would give you the opportunity to guide the user through the process, using labels with descriptions, so that they learn to associate the description with the label you've chosen (hopefully something succinct but intuitive). Then when they need to edit data, they have learned the application taxonomy.
If you are running into issues with tenses, steer clear of using verbs or only use the present tense. I would try using nouns - "smoker?" instead of "smokes?"
When you're asking for common data like phone numbers, email addresses, you can probably assume that the user will understand what you mean. Just be clear as to whose contact information you are asking for - using a title for the field set that is explicit is a good idea ("Employee Contact Details"), adding a short description above the field set will help too.
Of course, you should always do some level of usability testing on your application before you launch it to uncover any issues with the interface.
I want to add a custom column to the Inbox which is a Yes/No column. I want an icon to show in the Yes case. How can I do this?
Everything I've looked up is either about adding a column through the View.XML property, through UserProperties.Add with addToFolderFields = true, or through Field Chooser.
There are also a lot of forums where Dmitry from dimastr.com just tells people it's not possible to set an icon with no real explanation.
It's pretty frustrating - why would Outlook's UI support creating Icon fields if you can't set an icon for them?! Won't they just always be blank columns?!
Some alternative questions that would also help if they were answered:
What is the "bitmap" element in the View.XML of a <column>?
How can I set a userproperty as the value of a column using the "prop" element of a <column>?
Where can I find a description of the View.XML definition? Microsoft articles all have bad links.
Icons in the Header and icons in the column itself aren't possible without some kind of Windows API hacks on the column cells.
If someone has a good one, I'll mark it as an answer. Otherwise, I'll mark this ("Impossible") as the accepted answer.
EDIT: I looked with Spy++. Outlook's view is a "SUPERGRID" that is manually painted. You don't have access to individual cells. So that makes it a lot harder. A hack would have to like subclass the SUPERGRID and override some internal method or something. Then replace Outlook's SUPERGRID with the subclassed one. Or something equally terrible. I'm thinking impossible is the only real answer...
may you check that thread, therer might be an solution via form
http://www.outlookcode.com/threads.aspx?forumid=3&messageid=31897