add h1 to user profile page

flag=none
fixes VICE-1042

test plan:
- In your root account settings page,
   check Enable Profiles and save
- visit /profile
- Open your screenreader
- verify that it reads the hidden h1 as User Profile

Change-Id: Ia7f770d4d9a1fb5ed6dfde15fb61a9daf5820127
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256551
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Davis Hyer <dhyer@instructure.com>
QA-Review: Davis Hyer <dhyer@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
This commit is contained in:
Caleb Guanzon 2021-01-12 12:01:14 -07:00
parent 3ebb7e7a07
commit 6dc35965a6
2 changed files with 10 additions and 0 deletions

View File

@ -18,6 +18,7 @@
<% provide :page_title, "User Profile" %>
<div class="ic-Profile-layout">
<h1 class="screenreader-only"><%= t("User Profile") %></h1>
<div class="ic-Profile-layout__Primary">
<%= render 'shared/profile' %>
</div>

View File

@ -389,6 +389,15 @@ describe "profile" do
end
end
it 'show /profile when enable_profiles = true' do
user_logged_in
account = Account.default
account.settings[:enable_profiles] = true
account.save!
get '/profile'
expect(fj("h1:contains('User Profile')").attribute('class')).to eq 'screenreader-only'
end
describe "profile pictures s3 tests" do
# TODO: reimplement per CNVS-29611, but make sure we're testing at the right level
it "should successfully upload profile pictures"