From 8a7bc38861753776c4889976799e2a190639d4fd Mon Sep 17 00:00:00 2001 From: Philipp Heckel Date: Tue, 3 May 2022 14:53:07 -0400 Subject: [PATCH] Finish up the labelling --- docs/releases.md | 1 + web/public/static/langs/en.json | 1 + web/src/components/PublishDialog.js | 53 ++++++++++++++++++++------- web/src/components/SubscribeDialog.js | 27 ++++++++++++-- 4 files changed, 65 insertions(+), 17 deletions(-) diff --git a/docs/releases.md b/docs/releases.md index 7fed13b..70a2974 100644 --- a/docs/releases.md +++ b/docs/releases.md @@ -27,6 +27,7 @@ to [@Joeharrison94](https://github.com/Joeharrison94) for the input. **Features:** * Better parsing of the user actions, allowing quotes (no ticket) +* Make web app more accessible ([#217](https://github.com/binwiederhier/ntfy/issues/217)) **Bugs:** diff --git a/web/public/static/langs/en.json b/web/public/static/langs/en.json index 30944e3..d85695a 100644 --- a/web/public/static/langs/en.json +++ b/web/public/static/langs/en.json @@ -118,6 +118,7 @@ "subscribe_dialog_subscribe_description": "Topics may not be password-protected, so choose a name that's not easy to guess. Once subscribed, you can PUT/POST notifications.", "subscribe_dialog_subscribe_topic_placeholder": "Topic name, e.g. phil_alerts", "subscribe_dialog_subscribe_use_another_label": "Use another server", + "subscribe_dialog_subscribe_base_url_label": "Service URL", "subscribe_dialog_subscribe_button_cancel": "Cancel", "subscribe_dialog_subscribe_button_subscribe": "Subscribe", "subscribe_dialog_login_title": "Login required", diff --git a/web/src/components/PublishDialog.js b/web/src/components/PublishDialog.js index 90e4b9b..1310823 100644 --- a/web/src/components/PublishDialog.js +++ b/web/src/components/PublishDialog.js @@ -240,7 +240,6 @@ const PublishDialog = (props) => { setBaseUrl(ev.target.value)} @@ -248,11 +247,13 @@ const PublishDialog = (props) => { type="url" variant="standard" sx={{flexGrow: 1, marginRight: 1}} + inputProps={{ + "aria-label": t("publish_dialog_base_url_label") + }} /> setTopic(ev.target.value)} @@ -261,13 +262,15 @@ const PublishDialog = (props) => { variant="standard" autoFocus={!messageFocused} sx={{flexGrow: 1}} + inputProps={{ + "aria-label": t("publish_dialog_topic_label") + }} /> } setTitle(ev.target.value)} @@ -275,11 +278,13 @@ const PublishDialog = (props) => { type="text" fullWidth variant="standard" + inputProps={{ + "aria-label": t("publish_dialog_title_label") + }} /> setMessage(ev.target.value)} @@ -290,6 +295,9 @@ const PublishDialog = (props) => { autoFocus={messageFocused} fullWidth multiline + inputProps={{ + "aria-label": t("publish_dialog_message_label") + }} />
{ setTags(ev.target.value)} @@ -311,6 +318,9 @@ const PublishDialog = (props) => { type="text" variant="standard" sx={{flexGrow: 1, marginRight: 1}} + inputProps={{ + "aria-label": t("publish_dialog_tags_label") + }} /> {