-
-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accessibility improvements: keyboard navigation and labelling #1568
base: master
Are you sure you want to change the base?
Conversation
The ad-hoc labelling used here forces us to use the check box’s actual content as a description, removing the mnemonic underscore chars and working around an Orca bug.
This will only read the icon name when a system icon is used; in case of custom icons a generic “Icon” label is read instead of the full path. This commit adds a function to libcaja, as it will be useful elsewhere down the line.
|
||
gchar *icon_name; | ||
get_image_for_properties_window (window, &icon_name, NULL); | ||
if (! icon_name) | ||
icon_name = g_strdup (_("Icon")); | ||
atk_object_set_name (gtk_widget_get_accessible (GTK_WIDGET (button)), | ||
icon_name); | ||
g_free (icon_name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a11y: do not mix filenames with filetypes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a filetype description, it’s a description of the Accessible object. Unless we have a name for this icon, all we know is that it’s an icon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
icon_name = g_strdup (_("Icon"));
is a filetype description, meanwhile icon_name
comes from the file name and it's actually used as an identifier. You can get all icon_name
ids by running the command below:
find /usr/share/icons -type f -exec basename {} \; | grep -Po '.*(?=\.)' | sort -u
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rbuj I don't get what you mean? Indeed get_image_for_properties_window()
will return the name of the icon which is not necessarily a great description, but most likely better than nothing, and probably better than a generic "icon". Or is there a way to get a description of the icon?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cwendling, in the case of the HTML language, why do you think the ALT attribute was added to the IMG tag instead of saying the URL or the filename?
The name of the icons, which are identifiers, they aren't fields which the end user needs to know.
https://freedesktop.org/wiki/Specifications/icon-naming-spec/
@vvillenave Can you explain this new functionality with some real examples? ie. what is the full message the user receives? Can the new message you propose be globalized (g11n = i18n + L10n)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rbuj @cwendling See my latest attempt.
- Right now, the only thing that’s read when a screen reader reaches that button is: “Button”. (Hardly helpful.)
- IIUC, that button actually conveys two pieces of information: it displays the currently used icon, and offers a way to select another one instead.
- When a stock icon is used (e.g.
user-desktop
or whatever), we can retrieve its name; indeed, it won’t be localized (AFAIK there’s no mechanism anywhere in GTK for that) but that’s already a piece of useful information: to begin with, it allows to know which icons are different from one another. - Whenever a direct path to an icon is used for some reason, obtaining its name is trickier: therefore I suggest using a generic accessible name instead (I suggested “Icon” as it wouldn’t have to require a new string translation, but that could be “Current icon” instead). That name is localized.
- That being said, since it’s not entirely clear that activating this button will allow to change the icon, I also added a description message in my latest attempt. That message is localized as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
incorrect use of the identifier icon_name
as a11y description, moreover, it isn't a g11n compatible field.
9bbfa82
to
e9ff496
Compare
Any news from this? |
I think we should wait to see what they say about the issue opened at orca, otherwise we are adding an useless code (adding a blank space at the end of the string). About using the identifier About adding a function that removes the underscores... I don't think it's really necessary, but I'm not against it, maybe there's a pango function that allows you to get the text rendered without mnemonics, or any other formatting text. |
I don't think it's a good solution adding a blank widget to allow keyboard navigation. |
This implies creating an empty focusable widget so that its mnemonic label will be read when pressing Tab.
This whole window should be rewritten as a GtkDialog with standard buttons.
Otherwise there would be no way to leave that text area without using the mouse.
Any news from this? |
Almost all the proposed changes are related to bugs which come from the third party software called orca. If we considered them useful, then we should be able to remove them when they are fixed in orca, so they need to be labeled with labels such as FIXME including the uri of the external bug. In addition you shoudn't split commits which make use of the new method called caja_remove_mnemonics. At first glance I haven't seen any change since my last review, the improper use of the file name as a image description, adding a blank widget to allow navigation, adding a blank space at the end because of the recent changes in orca... |
What is the current status of this? Have the problems been fixed in Orca? If not, do we want to mark all these changes w FIXME's to remove them if Orca gets updates to do the same job, close this, or something else? |
Should we close this since it relates to trying to work around bugs in an old version of Orca? |
No description provided.