[wp-trac] [WordPress Trac] #34816: Theme Delete Button: (Prevent this page from creating additional dialogs)
WordPress Trac
noreply at wordpress.org
Tue Jan 5 11:08:06 UTC 2016
#34816: Theme Delete Button: (Prevent this page from creating additional dialogs)
-------------------------------------+-------------------------------------
Reporter: emiluzelac | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.5
Component: Themes | Version: 4.3.1
Severity: normal | Resolution:
Keywords: good-first-bug has- | Focuses: ui, accessibility,
patch has-screenshots needs- | javascript
refresh |
-------------------------------------+-------------------------------------
Changes (by swissspidy):
* keywords: good-first-bug has-patch has-screenshots => good-first-bug
has-patch has-screenshots needs-refresh
Comment:
Replying to [comment:9 afercia]:
> I'd suggest to have a look at what was done for the `wp-embed-share-
dialog`, see the aria role "dialog", the aria-label attribute used on the
modal container, focus handling and constraining tabbing.
> - when opening the modal, focus should be moved to the modal: probably
making the container itself focusable since this modal doesn't contain
just form elements but also text that needs to be made available to
assistive technologies
Done in the latest patch.
> - maybe add a Close button on the top right, in this case this should be
the first element to receive focus
I'd rather like do that when settling for some kind of Modal API as you
suggested.
> - when opening the modal, a CSS class `modal-open` should be added to
the body and then removed when closing the modal
This class is already present because of the theme overlay (which itself
is a modal).
> - pressing Escape should close the modal
Done in the latest patch.
> - when closing the modal, focus should be moved back to the "Delete"
button
> - tabbing should be constrained within the modal
Both still to be done. Anyone wanna chime in?
> - the "Cancel" link without a `href` attribute is not focusable, should
be a button with a `type="button"` attribute
> - I'd consider to place the primary button on the left
> - maybe `event` should be explicitly passed to `deleteTheme`
Done in the latest patch.
> - when pressing OK to confirm the deletion, focus should be moved back
to the most logical place (not sure where actually, maybe making the
"Theme deleted" notice focusable)
Still to be done.
> - I'm probably missing something :)
>
> There are several modal dialog used in the admin, each one with its own
implementation, duplicated code sometimes, just a few modals have a
sufficient level of accessibility. Sooner or later we should probably
standardize all the modal dialogs an have a sort of mini "Modal API".
+1. If this ticket turns out to be more complicated than it seems, perhaps
we should first start this standardization.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34816#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list