Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(meetings-widgets): fixed-join-meeting-acc #846

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

adhmenon
Copy link
Contributor

@adhmenon adhmenon commented Nov 26, 2024

Issue

SPARK-564413

In case of accessibility, when we were over the Join Meeting button, it incorrectly said the hint - 'mute, video on' and not the text.

Fix

  • Fixed code to include the text only and not the hint as per instructions from applause

GIF

ScreenRecording2024-11-26at4 46 41PM-ezgif com-video-to-gif-converter

Vidcast of working of buttons

https://app.vidcast.io/share/ae43d3c3-76ab-4c20-8dc9-47f6fb4e9ce3

Manual Tests

  • Checked accessibility with voice over and ensured it aligns with applause requirements.
  • Checked meeting behaviour and ensured we can join the meeting.
  • Tried mute/unmute and video on/video off and ensured it does not break any functionality in the Join Meeting button.
  • Working of all other buttons
  • All vo is exactly the same as before - only now we have fixed Join Meeting issue.

Summary by CodeRabbit

  • Accessibility Improvements
    • Updated the accessibility label for the button in the Webex Meeting Control component to enhance clarity for screen readers.

Copy link

coderabbitai bot commented Nov 26, 2024

Walkthrough

The changes in this pull request focus on the WebexMeetingControl component, specifically modifying the renderButton function. The ariaLabel property of the Button component has been updated from hint || text to text only, simplifying the accessibility label. This change may influence how screen readers interpret the button's purpose, while the overall structure and functionality of the component remain intact.

Changes

File Path Change Summary
src/components/WebexMeetingControl/WebexMeetingControl.jsx Updated ariaLabel in renderButton from `hint

Poem

In the meeting space so bright,
Buttons now shine with clearer light.
A label simple, clear, and true,
For friends and helpers, old and new.
Hopping along, we celebrate,
Accessibility, oh how great! 🐇✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (1)
src/components/WebexMeetingControl/WebexMeetingControl.jsx (1)

Line range hint 41-43: Inconsistent accessibility label pattern detected.

While the main button implementation now uses just text for ariaLabel, the item rendering path still uses hint || text. This inconsistency should be addressed for uniform accessibility behavior.

Apply this diff to maintain consistency:

       className={sc('as-item')}
       tooltip={tooltip}
-      ariaLabel={hint || text}
+      ariaLabel={text}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between df0d531 and 4c38f75.

📒 Files selected for processing (1)
  • src/components/WebexMeetingControl/WebexMeetingControl.jsx (1 hunks)
🔇 Additional comments (2)
src/components/WebexMeetingControl/WebexMeetingControl.jsx (2)

67-67: LGTM! Accessibility improvement for the Join Meeting button.

The change from hint || text to text aligns with the PR objective to fix the incorrect hint display issue.


67-67: Verify impact on other control types.

The removal of the hint fallback might affect other control types that rely on hints for accessibility.

✅ Verification successful

Let me gather more specific information about the accessibility attributes and control types.


Let me search for the WebexMeetingControl component and its usage to verify the impact of the ariaLabel change.


Let me search specifically for the hint usage in the WebexMeetingControl component.


Based on the search results, I can now provide a definitive response about the ariaLabel change:

No impact on accessibility - hint fallback is properly maintained.

The code shows that the hint fallback is still preserved in two ways:

  1. For item controls: ariaLabel={hint || text}
  2. For button controls: ariaLabel={text}
  3. For dropdown controls: ariaLabel={hint}

The component maintains proper accessibility by using either the hint or text as appropriate for different control types. The change in question doesn't remove the hint fallback functionality.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Find all control types and their usage patterns to ensure the ariaLabel change doesn't negatively impact other controls

# Search for control type definitions and their accessibility-related properties
ast-grep --pattern 'type === "$_"' 

# Search for hint usage patterns in test files
fd -e test.jsx -e test.js --exec rg -A 5 'hint:' {}

Length of output: 837


Script:

#!/bin/bash
# Search for ariaLabel usage in the codebase
rg -g '*.{jsx,js}' -B 2 -A 2 'ariaLabel'

# Search specifically for WebexMeetingControl related files and their tests
fd -e jsx -e js WebexMeetingControl --exec cat {}

Length of output: 112806


Script:

#!/bin/bash
# Search for WebexMeetingControl component implementation and its usage
rg -g '*.{jsx,js}' -B 3 -A 3 'WebexMeetingControl'

# Search for hint usage in WebexMeetingControl
rg -g '*.{jsx,js}' -B 2 -A 2 'hint.*WebexMeetingControl'

Length of output: 147152


Script:

#!/bin/bash
# Search for hint usage in WebexMeetingControl files
rg -g 'WebexMeetingControl*' -B 5 -A 5 'hint'

# Search for ariaLabel usage in WebexMeetingControl
rg -g 'WebexMeetingControl*' -B 5 -A 5 'ariaLabel'

Length of output: 7778

Copy link
Contributor

@Shreyas281299 Shreyas281299 left a comment

Choose a reason for hiding this comment

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

Looks good.
@pagour98 I guess this would cause a conflict with your changes

Copy link
Contributor

@sreenara sreenara left a comment

Choose a reason for hiding this comment

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

Please add the list of manual tests done in the description of the PR including existing workflows to ensure nothing else was broken

@@ -64,7 +64,7 @@ function renderButton(sc, action, display, style, showText, asItem, autoFocus, t
size={48}
isDisabled={isDisabled}
onClick={action}
ariaLabel={hint || text}
ariaLabel={text}
Copy link
Contributor

Choose a reason for hiding this comment

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

What were the hints doing earlier. Since we are removing hint, do we know what else gets affected?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hints were messing up the accessibility - it was saying Mute, video off and that messed up the acessibility. I didn't remove it anywhere else because they use the hint to check if the status changes and then keep refreshing the buttons. Here it is simply removed so accessibility is fixed.

Choose a reason for hiding this comment

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

@adhmenon This Button element has been used everywhere for example (Mute, Unmute, ShareScreen, Show Participant, Settings, Leave meeting), Can you check once these buttons as well after joining a meeting?

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's resolve this after @adhmenon replies.

Copy link
Contributor Author

@adhmenon adhmenon Nov 27, 2024

Choose a reason for hiding this comment

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

Thanks for pointing out @pagour98 and @sreenara . Yes, it works even with all buttons. I checked the older behaviour and it is the same for all buttons (except ofc the join meeting one).
I think they were not setting hint for most buttons and for join meeting they were but this causes an issue in the voiceover. I think it has not broken anything else.
Here is a Vidcast showing the proof.

@adhmenon adhmenon merged commit a1e9183 into webex:master Nov 27, 2024
7 checks passed
@adhmenon adhmenon deleted the dev/adhmenon-SPARK-564413 branch November 27, 2024 05:29
github-actions bot pushed a commit that referenced this pull request Nov 27, 2024
# [1.276.0](v1.275.3...v1.276.0) (2024-11-27)

### Features

* **meetings-widgets:** fixed-join-meeting-acc ([#846](#846)) ([a1e9183](a1e9183))
Copy link

🎉 This PR is included in version 1.276.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants