send_later_popover: Redesign popover and add accessibility improvements.

As part of the popover menu redesign, this redesigns the compose send
options popover using the new "popover-menu" tippy theme and improves
accessibility by using appropriate ARIA attributes.

Fixes #25117.
This commit is contained in:
Sayam Samal
2024-06-26 21:13:20 +05:30
committed by Tim Abbott
parent e5e5ba6cea
commit e0ec522f70
7 changed files with 155 additions and 77 deletions

View File

@@ -7,7 +7,6 @@ import render_send_later_modal_options from "../templates/send_later_modal_optio
import * as blueslip from "./blueslip";
import * as channel from "./channel";
import * as common from "./common";
import * as compose from "./compose";
import * as compose_state from "./compose_state";
import * as compose_validate from "./compose_validate";
@@ -144,6 +143,7 @@ export function toggle() {
export function initialize() {
tippy.delegate("body", {
...popover_menus.default_popover_props,
theme: "popover-menu",
target: "#send_later i",
onUntrigger() {
// This is only called when the popover is closed by clicking on `target`.
@@ -174,7 +174,6 @@ export function initialize() {
// Make sure the compose drafts count, which is also displayed in this popover, has a current value.
drafts.update_compose_draft_count();
const $popper = $(instance.popper);
common.adjust_mac_kbd_tags(".enter_sends_choices kbd");
$popper.one("click", ".send_later_selected_send_later_time", () => {
const send_at_timestamp = scheduled_messages.get_selected_send_later_timestamp();
do_schedule_message(send_at_timestamp);