Skip to content

Conversation

@Rajdeepc
Copy link
Contributor

@Rajdeepc Rajdeepc commented Nov 14, 2023

Description

Added label property for resizable elements of split-view

Related issue(s)

Motivation and context

How has this been tested?

  • Test case 1
    1. Go here
    2. Do this
  • Test case 2
    1. Go here
    2. Do this

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (minor updates related to the tooling or maintenance of the repository, does not impact compiled assets)

Checklist

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • If my change required a change to the documentation, I have updated the documentation in this pull request.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices

Best practices

This repository uses conventional commit syntax for each commit message; note that the GitHub UI does not use this by default so be cautious when accepting suggested changes. Avoid the "Update branch" button on the pull request and opt instead for rebasing your branch against main.

@Rajdeepc Rajdeepc added a11y Issues or PRs related to accessibility Component: Documentation Issues or PRs involving changes to docs or docs website. Component prefix is for Jira integration. Component: Split view labels Nov 14, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Nov 14, 2023

Tachometer results

Chrome

action-menu permalink

Version Bytes Avg Time vs remote vs branch
npm latest 640 kB 188.39ms - 192.64ms - unsure 🔍
-2% - +2%
-3.10ms - +3.07ms
branch 621 kB 188.29ms - 192.77ms unsure 🔍
-2% - +2%
-3.07ms - +3.10ms
-

menu permalink

Version Bytes Avg Time vs remote vs branch
npm latest 462 kB 252.97ms - 258.62ms - unsure 🔍
-1% - +2%
-2.95ms - +4.19ms
branch 449 kB 252.98ms - 257.36ms unsure 🔍
-2% - +1%
-4.19ms - +2.95ms
-

picker permalink

Version Bytes Avg Time vs remote vs branch
npm latest 506 kB 651.85ms - 669.65ms - unsure 🔍
-0% - +3%
-2.54ms - +18.39ms
branch 491 kB 647.33ms - 658.33ms unsure 🔍
-3% - +0%
-18.39ms - +2.54ms
-

sidenav permalink

Version Bytes Avg Time vs remote vs branch
npm latest 428 kB 343.15ms - 347.00ms - unsure 🔍
-1% - +1%
-4.29ms - +2.01ms
branch 416 kB 343.72ms - 348.71ms unsure 🔍
-1% - +1%
-2.01ms - +4.29ms
-

split-button permalink

Version Bytes Avg Time vs remote vs branch
npm latest 712 kB 1853.54ms - 1856.57ms - unsure 🔍
-0% - +0%
-0.76ms - +3.37ms
branch 696 kB 1852.36ms - 1855.16ms unsure 🔍
-0% - +0%
-3.37ms - +0.76ms
-

split-view permalink

Version Bytes Avg Time vs remote vs branch
npm latest 397 kB 37.34ms - 37.97ms - unsure 🔍
-4% - +0%
-1.45ms - +0.11ms
branch 383 kB 37.61ms - 39.04ms unsure 🔍
-0% - +4%
-0.11ms - +1.45ms
-

switch permalink

Version Bytes Avg Time vs remote vs branch
npm latest 401 kB 27.55ms - 27.94ms - unsure 🔍
-0% - +1%
-0.11ms - +0.35ms
branch 387 kB 27.51ms - 27.74ms unsure 🔍
-1% - +0%
-0.35ms - +0.11ms
-
Firefox

action-menu permalink

Version Bytes Avg Time vs remote vs branch
npm latest 640 kB 336.43ms - 345.09ms - unsure 🔍
-2% - +2%
-7.30ms - +6.90ms
branch 621 kB 335.33ms - 346.59ms unsure 🔍
-2% - +2%
-6.90ms - +7.30ms
-

menu permalink

Version Bytes Avg Time vs remote vs branch
npm latest 462 kB 434.29ms - 445.03ms - unsure 🔍
-1% - +2%
-6.20ms - +9.56ms
branch 449 kB 432.22ms - 443.74ms unsure 🔍
-2% - +1%
-9.56ms - +6.20ms
-

picker permalink

Version Bytes Avg Time vs remote vs branch
npm latest 506 kB 999.65ms - 1012.63ms - unsure 🔍
-1% - +1%
-11.86ms - +12.22ms
branch 491 kB 995.82ms - 1016.10ms unsure 🔍
-1% - +1%
-12.22ms - +11.86ms
-

sidenav permalink

Version Bytes Avg Time vs remote vs branch
npm latest 428 kB 548.04ms - 557.40ms - unsure 🔍
-2% - +1%
-12.93ms - +3.69ms
branch 416 kB 550.48ms - 564.20ms unsure 🔍
-1% - +2%
-3.69ms - +12.93ms
-

split-button permalink

Version Bytes Avg Time vs remote vs branch
npm latest 712 kB 1570.98ms - 1576.10ms - unsure 🔍
-0% - +0%
-1.88ms - +3.96ms
branch 696 kB 1571.08ms - 1573.92ms unsure 🔍
-0% - +0%
-3.96ms - +1.88ms
-

split-view permalink

Version Bytes Avg Time vs remote vs branch
npm latest 397 kB 83.84ms - 88.52ms - unsure 🔍
-7% - +2%
-6.26ms - +1.50ms
branch 383 kB 85.47ms - 91.65ms unsure 🔍
-2% - +7%
-1.50ms - +6.26ms
-

switch permalink

Version Bytes Avg Time vs remote vs branch
npm latest 401 kB 69.16ms - 73.52ms - unsure 🔍
-7% - +3%
-4.92ms - +2.28ms
branch 387 kB 69.80ms - 75.52ms unsure 🔍
-3% - +7%
-2.28ms - +4.92ms
-

@castastrophe
Copy link
Contributor

@Rajdeepc I added an idea to the original issue if you wanted to weigh in there!

Copy link
Member

@najikahalsema najikahalsema left a comment

Choose a reason for hiding this comment

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

Could you actually give a value to the labels here?

@Rajdeepc
Copy link
Contributor Author

Rajdeepc commented Nov 15, 2023

Could you actually give a value to the labels here?

Adding a value on label will not change the aria-label in splitter since it is being hardcoded in the code
Here:

May be we should make it more dynamic and let the users add a dynamic value to the label?

najikahalsema
najikahalsema approved these changes Nov 15, 2023
@najikahalsema
Copy link
Member

Sorry, I accidentally closed the PR when trying to make this comment.

I think that the way the property is set though would allow for a custom label, though, right? Because the logic is

        const label =
            this.label || this.resizable ? 'Resize the panels' : undefined;

And the consumer can set this.label ... so are the only values 'Resize the panels' or undefined? What happens if you set this.label to some string value?

@Rajdeepc
Copy link
Contributor Author

Rajdeepc commented Nov 16, 2023

Sorry, I accidentally closed the PR when trying to make this comment.

I think that the way the property is set though would allow for a custom label, though, right? Because the logic is

        const label =
            this.label || this.resizable ? 'Resize the panels' : undefined;

And the consumer can set this.label ... so are the only values 'Resize the panels' or undefined? What happens if you set this.label to some string value?

@najikahalsema If we set this.label to some other string values. aria-label value still remains as 'Resize the panels` due to line 207
Screenshot 2023-11-16 at 6 39 05 PM

aria-label remains unchanged as this is expected since we are not adding this.label if we found this.label instead we are hardcoding.

Screenshot 2023-11-16 at 6 44 11 PM

@najikahalsema
Copy link
Member

Okay. I gotcha. I guess we can merge like how it is now and make a follow up issue.

najikahalsema
najikahalsema previously approved these changes Nov 16, 2023
Copy link
Contributor

@Westbrook Westbrook left a comment

Choose a reason for hiding this comment

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

label without a value is a non-sensical addition here. We should include a value in this change.

We should address the issue that was created herein, and in particular the reality that I wrote the logic to apply the aria-label value incorrectly. 🙈

const label =
            this.label || this.resizable ? 'Resize the panels' : undefined;

Should likely be

const label =
            this.label || (this.resizable ? 'Resize the panels' : undefined);

Or possibly:

const label =
            this.resizable ? (this.label || 'Resize the panels') : undefined;

So that the label attribute actually does something here...

Copy link
Member

@najikahalsema najikahalsema left a comment

Choose a reason for hiding this comment

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

Thanks, @Westbrook , for being able to articulate what I could not. ^^; Thanks for fixing this, Rajdeep.

@Westbrook Westbrook merged commit 1ac5058 into main Dec 1, 2023
@Westbrook Westbrook deleted the bug/label-splitview branch December 1, 2023 20:58
mirekszot pushed a commit that referenced this pull request Dec 6, 2023
#3800)

* docs(split-view): added label for resizable examples for documentation

* chore(split-view): updated readme and label logic

---------

Co-authored-by: Rajdeep Chandra <rajdeepc@adobe.com>
Co-authored-by: Najika Halsema Yoo <44980010+najikahalsema@users.noreply.github.com>
mirekszot pushed a commit that referenced this pull request Dec 6, 2023
#3800)

* docs(split-view): added label for resizable examples for documentation

* chore(split-view): updated readme and label logic

---------

Co-authored-by: Rajdeep Chandra <rajdeepc@adobe.com>
Co-authored-by: Najika Halsema Yoo <44980010+najikahalsema@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a11y Issues or PRs related to accessibility Component: Documentation Issues or PRs involving changes to docs or docs website. Component prefix is for Jira integration. Component: Split view

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug][a11y]: Update resizable examples in documentation using the label prop available in the api

5 participants