mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-27 01:02:42 +01:00
68b1dee139
Summary: Ref T13222. Fixes T12588. See PHI683. In several cases, we present the user with a choice between multiple major options: Alamnac service types, Drydock blueprint types, Repository VCS types, Herald rule types, etc. Today, we generally do this with radio buttons and a "Submit" button. This isn't terrible, but often it means users have to click twice (once on the radio; once on submit) when a single click would be sufficient. The radio click target can also be small. In other cases, we have a container with a link and we'd like to link the entire container: notifications, the `/drydock/` console, etc. We'd like to just link the entire container, but this causes some problems: - It's not legal to link block eleements like `<a><div> ... </div></a>` and some browsers actually get upset about it. - We can `<a><span> ... </span></a>` instead, then turn the `<span>` into a block element with CSS -- and this sometimes works, but also has some drawbacks: - It's not great to do that for screenreaders, since the readable text in the link isn't necessarily very meaningful. - We can't have any other links inside the element (e.g., details or documentation). - We can `<form><button> ... </button></form>` instead, but this has its own set of problems: - You can't right-click to interact with a button in the same way you can with a link. - Also not great for screenreaders. Instead, try adding a `linked-container` behavior which just means "when users click this element, pretend they clicked the first link inside it". This gives us natural HTML (real, legal HTML with actual `<a>` tags) and good screenreader behavior, but allows the effective link target to be visually larger than just the link. If no issues crop up with this, I'd plan to eventually use this technique in more places (Repositories, Herald, Almanac, Drydock, Notifications menu, etc). Test Plan: {F6053035} - Left-clicked and command-left-clicked the new JS fanciness, got sensible behaviors. Reviewers: amckinley Reviewed By: amckinley Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam Maniphest Tasks: T13222, T12588 Differential Revision: https://secure.phabricator.com/D19855 |
||
---|---|---|
.. | ||
button | ||
calendar | ||
object-item | ||
workboards | ||
phui-action-list.css | ||
phui-action-panel.css | ||
phui-badge.css | ||
phui-basic-nav-view.css | ||
phui-big-info-view.css | ||
phui-box.css | ||
phui-bulk-editor.css | ||
phui-chart.css | ||
phui-cms.css | ||
phui-comment-form.css | ||
phui-comment-panel.css | ||
phui-crumbs-view.css | ||
phui-curtain-view.css | ||
phui-document-pro.css | ||
phui-document-summary.css | ||
phui-document.css | ||
phui-feed-story.css | ||
phui-fontkit.css | ||
phui-form-view.css | ||
phui-form.css | ||
phui-head-thing.css | ||
phui-header-view.css | ||
phui-hovercard.css | ||
phui-icon-set-selector.css | ||
phui-icon.css | ||
phui-image-mask.css | ||
phui-info-view.css | ||
phui-invisible-character-view.css | ||
phui-left-right.css | ||
phui-lightbox.css | ||
phui-list.css | ||
phui-object-box.css | ||
phui-pager.css | ||
phui-pinboard-view.css | ||
phui-property-list-view.css | ||
phui-remarkup-preview.css | ||
phui-segment-bar-view.css | ||
phui-spacing.css | ||
phui-status.css | ||
phui-tag-view.css | ||
phui-timeline-view.css | ||
phui-two-column-view.css |