Commit 6d7f796f authored by Miriam Zimmerman's avatar Miriam Zimmerman Committed by Commit Bot

feedback: Add label and description to textarea.

Also, fix height calculation of the dialog (otherwise, this change would
cause the buttons to scroll partially out of the visible area).

BUG=chromium:1107910
TEST=deployed to chromebook, verified that label was present and read \
     by ChromeVox

Change-Id: I1d9d1dd37bc98a684b13ded643970692ed7e2240
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2461725
Commit-Queue: Miriam Zimmerman <mutexlox@chromium.org>
Reviewed-by: default avatarIan Barkley-Yeung <iby@chromium.org>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#815843}
parent 12a341d4
......@@ -6305,6 +6305,9 @@ the Bookmarks menu.">
<message name="IDS_FEEDBACK_CLOSE_BUTTON_LABEL" desc="Label of the app close button.">
Close
</message>
<message name="IDS_FEEDBACK_FREE_TEXT_LABEL" desc="Label of the text box where users can describe a problem they are having">
Describe the issue in detail
</message>
<message name="IDS_FEEDBACK_REPORT_URL_LABEL" desc="Label showing the URL that will be reported">
URL
</message>
......
62ab3da137c6ef42076a8f50ebb70c8e6060ab61
\ No newline at end of file
......@@ -77,6 +77,7 @@ ChromeFeedbackPrivateDelegate::GetStrings(
SET_STRING("additionalInfo", IDS_FEEDBACK_ADDITIONAL_INFO_LABEL);
SET_STRING("minimizeBtnLabel", IDS_FEEDBACK_MINIMIZE_BUTTON_LABEL);
SET_STRING("closeBtnLabel", IDS_FEEDBACK_CLOSE_BUTTON_LABEL);
SET_STRING("freeFormText", IDS_FEEDBACK_FREE_TEXT_LABEL);
SET_STRING("pageUrl", IDS_FEEDBACK_REPORT_URL_LABEL);
SET_STRING("screenshot", IDS_FEEDBACK_SCREENSHOT_LABEL);
SET_STRING("screenshotA11y", IDS_FEEDBACK_SCREENSHOT_A11Y_TEXT);
......
......@@ -30,7 +30,8 @@
</span>
</div>
<div id="content-pane" class="content">
<textarea id="description-text" aria-labelledby="page-title"></textarea>
<p id="free-form-text" i18n-content="freeFormText"></p>
<textarea id="description-text" aria-labelledby="free-form-text"></textarea>
<div>
<p id="additional-info-label" i18n-content="additionalInfo"><p>
</div>
......
......@@ -302,11 +302,11 @@ function resizeAppWindow() {
width = FEEDBACK_MIN_WIDTH;
}
// We get the height by adding the titlebar height and the content height +
// margins. We can't get the margins for the content-pane here by using
// style.margin - the variable seems to not exist.
let height = $('title-bar').scrollHeight + $('content-pane').scrollHeight +
CONTENT_MARGIN_HEIGHT;
// Note: If the display is shorter than this (e.g. if the user has it set to
// largest display size), the chrome app api(?) will cap the height of the
// window at the height of the screen and add a scroll bar. If we switch away
// from chrome apps, make sure that this behavior is the same.
let height = document.body.scrollHeight;
let minHeight = FEEDBACK_MIN_HEIGHT;
if (feedbackInfo.flow == chrome.feedbackPrivate.FeedbackFlow.LOGIN) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment