Skip to content
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions docs/guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,3 +348,21 @@ When you set a `discouraged` block in a feature file, do:
- Set one or more (optional) `alternative` feature IDs that are whole or partial substitutes for the discouraged feature.
An alternative doesn't have to be a narrow drop-in replacement for the discouraged feature but it must handle some use case of the discouraged feature.
Guide developers to the most relevant features that would help them stop using the discouraged feature.

## Notes

Features may have notes.
Presently, there is one type of note, a Baseline regression note.

### Baseline regression note

Use a note with a `category: baseline-regression` whenever the Baseline status goes backwards (such as from `"high"` to `"low"`).
This note type applies to any regression, whether it was caused by changes in upstream data or an editorial override.

In the `message` field, explain the cause of the regression.
Write the message to developers, to help them understand whether the regression applies to their use case.
If the cause is a newly-discovered or reported bug then briefly describe the nature of the bug.
If the cause is a correction then briefly describe the nature and origin of the correction (usually, upstream data).

In the `citations` field, include the URLs that are most important to understanding the nature and origin of the change.
For example, if BCD marked a feature as a `partial_implementation` due to a browser bug, include the URL for the browser bug and the BCD pull request or issue where the `partial_implementation` status was agreed.
15 changes: 9 additions & 6 deletions features/content-visibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@ description: The `content-visibility` CSS property delays rendering an element,
spec: https://drafts.csswg.org/css-contain-2/#content-visibility
group: css
caniuse: css-content-visibility
# TODO: https://github.com/web-platform-dx/web-features/issues/1971
# Status changed: https://github.com/web-platform-dx/web-features/pull/2591
# 2025-01-30 — low → false — Safari hides text behind `content-visibility: auto` from "Find…" in the page.
# References:
# - https://github.com/mdn/browser-compat-data/pull/25781
# - https://bugs.webkit.org/show_bug.cgi?id=283846
notes:
- category: baseline-regression
date: 2025-01-30
old_baseline_value: low
new_baseline_value: false
message: >
Safari prevents text in `content-visibility: auto` elements from being found with browser's "Find…" user interface.
citations:
- https://bugs.webkit.org/show_bug.cgi?id=283846
compat_features:
- api.ContentVisibilityAutoStateChangeEvent
- api.ContentVisibilityAutoStateChangeEvent.ContentVisibilityAutoStateChangeEvent
Expand Down
9 changes: 9 additions & 0 deletions features/createimagebitmap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ name: createImageBitmap
description: The `createImageBitmap()` global method creates an `ImageBitmap` object from a source such as an image, SVG, blob, or canvas. An `ImageBitmap` object represents pixel data that can be drawn to a canvas with lower latency than other types, such as `ImageData`.
spec: https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#imagebitmap
caniuse: createimagebitmap
notes:
- date: 2025-08-11
category: baseline-regression
old_baseline_value: high
new_baseline_value: low
message: >
This feature's status was recalculated to be more consistent with caniuse's criteria for full support, requiring `SVGImageElement` as a supported image source.
citations:
- https://github.com/web-platform-dx/web-features/pull/3173
status:
compute_from:
- api.createImageBitmap
Expand Down
16 changes: 10 additions & 6 deletions features/font-variant-position.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ name: font-variant-position
description: The `font-variant-position` CSS property sets whether to use alternate glyphs for subscript and superscript text.
spec: https://drafts.csswg.org/css-fonts-4/#font-variant-position-prop
group: font-features
# TODO: https://github.com/web-platform-dx/web-features/issues/1971
# Status changed: https://github.com/web-platform-dx/web-features/pull/1958
# 2024-10-15 — low → false — Chrome, Edge, and Safari do not implement font synthesis for missing superscript or subscript glyphs.
# References:
# - https://issues.chromium.org/issues/352218916
# - https://bugs.webkit.org/show_bug.cgi?id=151471
notes:
- date: 2024-10-15
category: baseline-regression
old_baseline_value: low
new_baseline_value: false
message: >
Chrome, Edge, and Safari do not implement font synthesis for missing superscript or subscript glyphs.
citations:
- https://issues.chromium.org/issues/352218916
- https://bugs.webkit.org/show_bug.cgi?id=151471
15 changes: 9 additions & 6 deletions features/link-rel-dns-prefetch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ name: '<link rel="dns-prefetch">'
description: The `rel="dns-prefetch"` attribute for the `<link>` HTML element is a hint to the browser that the page or user is likely to request resources from another domain, so the browser should preemptively resolve DNS for the `href` value's domain.
spec: https://html.spec.whatwg.org/multipage/links.html#link-type-dns-prefetch
caniuse: link-rel-dns-prefetch
notes:
- date: 2025-06-23
category: baseline-regression
old_baseline_value: low
new_baseline_value: false
message: >
Safari on iOS does not support this feature. Upstream data corrected an earlier report that it did.
citations:
- https://github.com/mdn/browser-compat-data/pull/27057
compat_features:
- html.elements.link.rel.dns-prefetch
# TODO: https://github.com/web-platform-dx/web-features/issues/1971
# Status changed: https://github.com/web-platform-dx/web-features/pull/3074/
# 2025-06-23 — low → false — On iOS, it was erroneously reported that this feature was supported.
# References:
# - https://developer.apple.com/documentation/safari-release-notes/safari-26-release-notes#Networking
# - https://github.com/mdn/browser-compat-data/pull/27057
16 changes: 10 additions & 6 deletions features/popover.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@ name: Popover
description: The `popover` HTML attribute creates an overlay to display content on top of other page content. Popovers can be shown declaratively using HTML, or using the `showPopover()` method.
spec: https://html.spec.whatwg.org/multipage/popover.html
group: html
# TODO: https://github.com/web-platform-dx/web-features/issues/1971
# Status changed: https://github.com/web-platform-dx/web-features/pull/1797
# 2024-09-18 — low → false — Safari on iOS has a bug that prevents dismissing popovers by touch.
# References:
# - https://github.com/mdn/browser-compat-data/issues/22927
# - https://bugs.webkit.org/show_bug.cgi?id=267688
# notes:
# - date: 2024-09-18
# category: baseline-regression
# old_baseline_value: low
# new_baseline_value: false
# message: >
# Safari on iOS has a bug that prevents light dismiss (tapping outside the element to close it).
# citations:
# - https://bugs.webkit.org/show_bug.cgi?id=267688
# - https://github.com/mdn/browser-compat-data/issues/22927
Comment on lines +5 to +14
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

When I opened this PR, I had written this note. However, the feature has since progressed. It occurred to me that we should not show irrelevant notes, so I commented it out. This is a rather new idea, so I'd like to delete this entirely, if we decide this is the right way to go.

Other options considered: some sort of "historic" flag on notes that are no longer relevant, or filtering historic notes from the published package. I figured both of those added complexity that wouldn't be very useful to anyone, least of all developers.

Copy link
Contributor

Choose a reason for hiding this comment

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

I almost feel like we should have a linting step in place which checks that notes.new_baseline_value is equal to status.baseline, and if not, deletes that particular note. I think keeping old notes about status regressions that no longer apply would be confusing. I don't think that web-features necessarily needs to keep track of the history of a feature. Its role is to document the platform as it is now.

status:
compute_from:
- api.HTMLElement.popover
Expand Down
6 changes: 0 additions & 6 deletions features/streams.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@ name: Streams
description: The streams API creates, composes, and consumes continuously generated data.
spec: https://streams.spec.whatwg.org/
group: streams
# TODO: https://github.com/web-platform-dx/web-features/issues/1971
# Status changed: https://github.com/web-platform-dx/web-features/pull/2358, https://github.com/web-platform-dx/web-features/pull/2491
# 2024-12-19 — low → false — Regressed status to match Caniuse, which considers support beginning at BYOB shipping.
# 2025-01-30 — false → high — Split BYOB into a separate "readable-byte-streams" feature. Linked that one to Caniuse.
# References:
# - https://caniuse.com/streams
Comment on lines -5 to -10
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I fussed over this for a while and ended up deciding to omit the note entirely. The first note would say that the feature regressed, the second note would be some new category (advance? unregression?) showing that we more or less reverted the second note. It seemed to me that the correct course of action in that scenario would be to withdraw the note, so that's what I've done.

Copy link
Contributor

Choose a reason for hiding this comment

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

I tend to agree. If our consumers really only care about baseline regressions, then we don't need a note here. Unless we have reasons to believe that the history of a feature would be useful. Which I don't think we do.

status:
compute_from:
- api.ReadableStream
Expand Down
16 changes: 16 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,13 @@ for (const [key, data] of yamlEntries('features')) {
data.description = text;
data.description_html = html;
}
if (Array.isArray(data.notes)) {
for (const note of data.notes as FeatureData["notes"]) {
const { text, html } = convertMarkdown(data.description);
note.message = text;
note.message_html = html;
}
}

// Compute Baseline high date from low date.
if (data.status?.baseline === 'high') {
Expand Down Expand Up @@ -163,6 +170,15 @@ for (const [key, data] of yamlEntries('features')) {
}
}

// Ensure regression notes are still relevant
if (Array.isArray(data.notes)) {
for (const [index, note] of (data.notes as FeatureData["notes"]).entries()) {
if (note.new_baseline_value !== data.status.baseline) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah cool! I see you've actually already done what I suggested in an earlier comment.

throw new Error(`regression note ${index} on ${key}.yml no longer applies (status is ${data.status.baseline}, note is ${note.new_baseline_value}). Delete this note.`);
}
}
}

if (data.compat_features) {
// Sort compat_features so that grouping and ordering in dist files has
// no effect on what web-features users see.
Expand Down
63 changes: 63 additions & 0 deletions schemas/data.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,69 @@
"description": "Short name",
"type": "string"
},
"notes": {
"description": "Notes about this feature",
"items": {
"additionalProperties": false,
"description": "A note describing a Baseline status regression. For example, a feature that has moved from Baseline low to not Baseline.",
"properties": {
"category": {
"const": "baseline-regression",
"description": "The topic of this note. This field is also a discriminator for any future note types",
"type": "string"
},
"citations": {
"description": "One or more URLs, such as bugs, used to justify the regression",
"items": {
"type": "string"
},
"type": "array"
},
"date": {
"description": "The date that the regression was added to web-features data",
"type": "string"
},
"message": {
"description": "A short description of the cause of the regression as a plain text",
"type": "string"
},
"message_html": {
"description": "A short description of the cause of the regression as HTML",
"type": "string"
},
"new_baseline_value": {
"description": "The `baseline` status value after the regression",
"enum": [
"low",
false
],
"type": [
"string",
"boolean"
]
},
"old_baseline_value": {
"description": "The `baseline` status value before the regression",
"enum": [
"high",
"low"
],
"type": "string"
}
},
"required": [
"category",
"date",
"message",
"message_html",
"citations",
"old_baseline_value",
"new_baseline_value"
],
"type": "object"
},
"type": "array"
},
"snapshot": {
"anyOf": [
{
Expand Down
23 changes: 23 additions & 0 deletions types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ export interface FeatureData {
compat_features?: string[];
/** Whether developers are formally discouraged from using this feature */
discouraged?: Discouraged;
/** Notes about this feature */
notes?: BaselineRegressionNote[];
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really need this to be an array? I don't think we do, but I can see the point that not making it an array might, some day, block us, and require a major release to change it then.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good question, @captainbrosset!

I think it's very likely that we'll have other note types and notes may need to coexist. My inclination was to introduce one note type, then add more. But I recognize it looks a little odd now because there really ought to be just one note at a time under the constraints presented here. But there's some likely follow up note types:

First, consider the mirror of a regression: a case where we've prevented a feature from advancing (think of it as "baseline-delay" categeory or something). There are two open cases of this right now, see #3228. It's possible (though rare) that a feature could have regressed and be prevented from advancing.

Second, there are cases where we might choose to not regress a feature, like #2957 (though it's still my preference to let it regress). It seems to me it might be wise for us to (publicly) acknowledge the bug, even if we do not believe it enough to regress the feature (something like "known-incompatibility", though ). That said, this type of note would be more tenuous (we might consider attaching notes to supported version number, for instance).

I imagine there are still further note types (e.g., something like solicitations for input on potentially deprecating or removing a feature, for instance, as in the case of XSLT), but I haven't given them a ton of thought yet.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see. The notes property is broad enough that we might indeed use it for other things. Based on this, I'm fine on making this an array. However, if we do add other types of notes in the future, that will still be a breaking change, right? Cause the schema will change. That might be fine by the way.

}

type BrowserIdentifier = "chrome" | "chrome_android" | "edge" | "firefox" | "firefox_android" | "safari" | "safari_ios";
Expand Down Expand Up @@ -82,6 +84,27 @@ interface Discouraged {
// https://github.com/web-platform-dx/web-features/issues/2722 is resolved.
}

/**
* A note describing a Baseline status regression.
* For example, a feature that has moved from Baseline low to not Baseline.
*/
interface BaselineRegressionNote {
/** The topic of this note. This field is also a discriminator for any future note types */
category: "baseline-regression";
/** The date that the regression was added to web-features data */
date: string;
/** A short description of the cause of the regression as a plain text */
message: string;
/** A short description of the cause of the regression as HTML */
message_html: string;
/** One or more URLs, such as bugs, used to justify the regression */
citations: string[];
/** The `baseline` status value before the regression */
old_baseline_value: "high" | "low";
/** The `baseline` status value after the regression */
new_baseline_value: "low" | false;
}

export interface GroupData {
/** Short name */
name: string;
Expand Down