-
Notifications
You must be signed in to change notification settings - Fork 197
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
Standardize drawer function for consistency and accessibility #995
Conversation
* Use actual buttons for toggles and actions. * Improve button and input labels for screen readers. * Make drawer markup more consistent. * Consolidate drawer js.
* Drawer toggles and remove actions are buttons. * Improved aria labeling for drawer actions. * Pull navigation link edit markup out into a partial for more legible management.
The js now covers toggling drawer contents and both delete and undo. The "data-action-selector" attribute tells the js what selector to toggle on relevant drawer components.
* Reduce redundancy in updateDeleteButtons. Most of it is now handled in the shared manageDrawers function in globals.js. * Manage display of 'remove/undo' buttons in the partial.
The way the partial was iterating resulted in duplicate ids.
New links were previously inserted into the navigation via the javascript using separate markup. This allows us to manage consistent markup for both new and existing navigation links. The form will include an empty version of this partial as a template, then the javascript clones and populates the template with new link data.
This allows the drawer javascript to listen to a larger container for clicks on the drawer buttons. Previously on forms that add new drawers, the new drawers would not get all the proper behaviors bound.
It's already called in edit-navigation.php.
* The form has an empty navigation link partial marked '.template'. The js clones the template and populates it with the relevant values. * Omeka.Navigation.populateNewNavLinkAttributes() exists because there are so many attributes to update to keep the new links screen reader friendly, alongside submitting properly. * The visit buttons are now actual buttons instead of links. The js has been updated accordingly. * The add new link form now shows required field alerts if not filled out properly. * Upon adding a new field, screen readers will read a success message that includes the total number of links on the form. * Instances of '.main_link' selectors have been updated to '#navigation_main_list .main_link' to avoid picking up empty template values.
Buttons are buttons now.
It is confusing for identical "remove" buttons to perform differently on the same form.
The controller now sends the temporary element id to the partials, which can then be referenced in other uses of aria-labelledby.
* Provide screen reader only styles. * Give individual labels to "Narrow by Specific Fields" inputs. * Have screen readers narrate field and input labels.
This fixes a minor deprecation warning caused by Zend_Ldap attempting to str_replace() on null, for plugins adding LDAP support to Omeka Classic via the Zend libraries.
Amazon's defaults are to disable per-object ACLs for new buckets, so having this option avoids users having to change from the default permissions and ownership settings, and having to grant permissions for the IAM user to put ACLs. (fix #1000)
Since pagination is typically duplicated on the page, these element ids would also be duplicated.
I'll bump this for review since we're amidst a bunch of accessibility work anyway. I've updated the branch with changes from master and to also include "No description available" text for elements that have not been provided a description, which I think was the last todo on the testing issue. |
Some sort of problem has happened with the merge or rebase here, you've got changed versions of all the commits you just brought in. |
The |
It's not so much that but more the... directionality of the rebase or whatever happened here. I'll see what I can do about it. |
Take a look at master...drawer-toggle-a11y-rebase and see if it has everything you want it to have from this branch. |
It looks good to me. |
This pull request consolidates multiple uses of the "drawer" pattern where a component can collapse and expand, and often be marked for removal or be dragged to create order. It also does the following:
Omeka.manageDrawers()
inglobals.js
, to centralize near identical functionality spread across js for navigation and item type elements.