Skip to content

enh(oauth2): allowed toggling of aria label - #42132

Merged
emoral435 merged 1 commit into
masterfrom
fix/client-secret-aria
Dec 15, 2023
Merged

enh(oauth2): allowed toggling of aria label#42132
emoral435 merged 1 commit into
masterfrom
fix/client-secret-aria

Conversation

@emoral435

@emoral435emoral435 commented Dec 9, 2023

Copy link
Copy Markdown
Contributor

Summary

The button in the table for OAuth 2.0 previously only had the aria label of "Show client secret", even when the button had toggled the rendering of the client secret. Switched aria label to "Hide client secret" when the rendered secret is visible!

TODO

  • add a way to toggle between the states and correctly assign the aria label

Images

BeforeAfter
image(image

Checklist

@emoral435

Copy link
Copy Markdown
ContributorAuthor

/compile /

@emoral435

Copy link
Copy Markdown
ContributorAuthor

/backport to stable28

ShGKme
ShGKme previously requested changes Dec 11, 2023
Comment threadapps/oauth2/src/components/OAuthItem.vue Outdated
@ShGKmeShGKme added this to the Nextcloud 29 milestone Dec 11, 2023
@emoral435
emoral435force-pushed the fix/client-secret-aria branch from c7d2c17 to b24c13dCompareDecember 12, 2023 15:17
@emoral435
emoral435 dismissed ShGKme’s stale reviewDecember 12, 2023 15:18

added computed value for a constant string for community translators to work with 💖

@emoral435
emoral435force-pushed the fix/client-secret-aria branch from b24c13d to 0b75c5eCompareDecember 12, 2023 15:19
@emoral435

Copy link
Copy Markdown
ContributorAuthor

/compile /

@ShGKmeShGKme left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The icon on this button also has a fixed title.

:title="t('oauth2', 'Show client secret')"

Using title on a span is not correct, it should be on the button and it has same dynamic value with "Hide".

But in this case, I think we can just remove the title attr here.

@emoral435

Copy link
Copy Markdown
ContributorAuthor

nice catch! gonna delete that part and then submit the new version : )

@emoral435
emoral435force-pushed the fix/client-secret-aria branch from b11addf to 4f799bbCompareDecember 13, 2023 14:36
@emoral435

Copy link
Copy Markdown
ContributorAuthor

/compile /

@ShGKmeShGKme left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Works and seems fine now

Comment threadapps/oauth2/src/components/OAuthItem.vue Outdated
@emoral435
emoral435force-pushed the fix/client-secret-aria branch 2 times, most recently from 2a82c03 to 33dfc9bCompareDecember 14, 2023 21:12
@emoral435

Copy link
Copy Markdown
ContributorAuthor

@Pytal removed all comments 👍, agree with Grigorii that the name itself is self explanatory!

@ShGKmeShGKme left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It should have been catched by linter...

Comment threadapps/oauth2/src/components/OAuthItem.vue Outdated
Comment threadapps/oauth2/src/components/OAuthItem.vue Outdated
@emoral435
emoral435force-pushed the fix/client-secret-aria branch 2 times, most recently from a2f75d1 to 7d9e2c9CompareDecember 15, 2023 00:38
Comment threadapps/oauth2/src/components/OAuthItem.vue Outdated
Signed-off-by: Eduardo Morales <emoral435@gmail.com>
@emoral435
emoral435force-pushed the fix/client-secret-aria branch from 7d9e2c9 to 254f4b0CompareDecember 15, 2023 02:17
@emoral435
emoral435 requested a review from PytalDecember 15, 2023 02:18
@emoral435
emoral435 merged commit 29763f0 into masterDec 15, 2023
@emoral435
emoral435 deleted the fix/client-secret-aria branch December 15, 2023 02:47
@blizzzblizzz mentioned this pull request Mar 5, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

3 participants

@emoral435@Pytal@ShGKme