Skip to content

[Bugfix:Notifications] Refactor Notification Accessibility#12343

Merged
bmcutler merged 6 commits intomainfrom
vue-noti-accessibility
Jan 27, 2026
Merged

[Bugfix:Notifications] Refactor Notification Accessibility#12343
bmcutler merged 6 commits intomainfrom
vue-noti-accessibility

Conversation

@JManion32
Copy link
Contributor

@JManion32 JManion32 commented Jan 20, 2026

Why is this Change Important & Necessary?

Fixes #12340 --- Sometimes the system cypress test fails due to some accessibility issues in Notification.vue.
The element “a” must not appear as a descendant of an element with the attribute “role=link”.

What is the New Behavior?

  1. Converted the mark seen button from an <a> to a <button> since it triggers an action, but does not follow a URL.
  2. Split the notification div into 2 containers: main-notification-content (icon, title, metadata) and the mark seen button.

This refactor comes at the cost of making the small area around the mark seen button unclickable. This area can grow in height depending on how much the title wraps. In the picture below, I have marked the unclickable area with red. Please note that this is an extreme example of wrapping, in most cases it will only be a couple pixels.
Untitled Project (4)

Although I was initially opposed to having any dead space on the notification component, I think this small amount is actually beneficial. If users accidentally click around the mark seen, they will no longer be corralled to another page.

What steps should a reviewer take to reproduce or test the bug or new feature?

Ensure Notification.vue functionality is unchanged (aside from the new dead space). Ensure user experience and accessibility is good. The accessibility Cypress test should no longer fail. Click "Validate HTML" at the bottom of the page and see that there are no errors.

Automated Testing & Documentation

The notification system does not have adequate E2E testing, I will be addressing this in a PR that resolves #11908

Other information

This is not a breaking change, though it is on the home page so adequate testing is essential.

The main focus is the notifications, but I also switched the <h3> elements for the courses ranks to <h2> to make sure no heading levels are skipped.

@codecov
Copy link

codecov bot commented Jan 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 21.67%. Comparing base (f2fc7e1) to head (5b92ec8).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##               main   #12343   +/-   ##
=========================================
  Coverage     21.67%   21.67%           
  Complexity     9618     9618           
=========================================
  Files           268      268           
  Lines         36158    36158           
  Branches        486      486           
=========================================
  Hits           7837     7837           
  Misses        27839    27839           
  Partials        482      482           
Flag Coverage Δ
autograder 21.39% <ø> (ø)
js 2.04% <ø> (ø)
migrator 100.00% <ø> (ø)
php 20.69% <ø> (ø)
python_submitty_utils 80.08% <ø> (ø)
submitty_daemon_jobs 90.72% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@automateprojectmangement automateprojectmangement bot moved this from Seeking Reviewer to In Review in Submitty Development Jan 20, 2026
Copy link
Contributor

@Rkoester47 Rkoester47 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested the changes made on this branch, and can confirm that the home page notification functionality remains. I was able to view, and clear my notifications as usual. The extra dead space around the mark as seen button is not an issue, in my opinion. As all checks are now passing, I think these changes successfully accomplish the goals outlined by this PR.

@github-project-automation github-project-automation bot moved this from In Review to Awaiting Maintainer Review in Submitty Development Jan 20, 2026
Copy link
Contributor

@williamschen23 williamschen23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The heading h3 (with computed level 3) follows the heading h1 (with computed level 1), skipping 1 heading level.

Not really notification related but is still on the home page
Click "Validate page HTML" on the bottom on the home page as instructor

@github-project-automation github-project-automation bot moved this from Awaiting Maintainer Review to Work in Progress in Submitty Development Jan 20, 2026
@JManion32
Copy link
Contributor Author

The heading h3 (with computed level 3) follows the heading h1 (with computed level 1), skipping 1 heading level.

Not really notification related but is still on the home page Click "Validate page HTML" on the bottom on the home page as instructor

I can sneak that in here.

@github-project-automation github-project-automation bot moved this from Work in Progress to Awaiting Maintainer Review in Submitty Development Jan 20, 2026
@bmcutler
Copy link
Member

@JManion32 please resolve conflicts

@bmcutler bmcutler merged commit a090867 into main Jan 27, 2026
47 of 48 checks passed
@bmcutler bmcutler deleted the vue-noti-accessibility branch January 27, 2026 18:05
@github-project-automation github-project-automation bot moved this from Awaiting Maintainer Review to Done in Submitty Development Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

End-to-End Testing of Notifications Notification.vue accessibility

4 participants