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

Use a span rather than div inside Summary, as div not allowed #895

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions toolkits/global/packages/global-details/HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# History

## 2.0.1 (2024-09-10)
* Use a span inside the summary rather than div

## 2.0.0 (2023-05-17)
* BREAKING: Removes use of $tokens--typography-block-spacing-medium in springer settings and replaces with 1.5em
* BREAKING: Upgrade to brand-context v32.0.0 - the version that removes block-spacing styling
Expand Down
2 changes: 1 addition & 1 deletion toolkits/global/packages/global-details/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@springernature/global-details",
"version": "2.0.0",
"version": "2.0.1",
"license": "MIT",
"description": "A JS-independent, accessible disclosure component",
"keywords": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@

/* ↓ Complex selector necessary to ensure
nested icons are not rotated */
.c-details > [open] > summary > div > .u-icon {
.c-details > [open] > summary > .u-icon {
transform: rotate(90deg);
}

Expand Down
4 changes: 2 additions & 2 deletions toolkits/global/packages/global-details/view/details.hbs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<{{#if listItem}}li{{else}}div{{/if}} class="c-details">
<details {{#if open}}open{{/if}} class="c-details__details">
<summary class="c-details__summary">
<div class="c-details__header" {{#if headingLevel}}role="heading" aria-level="{{headingLevel}}"{{/if}}>
<span class="c-details__header" {{#if headingLevel}}role="heading" aria-level="{{headingLevel}}"{{/if}}>
<svg class="u-icon" width="22" height="22" aria-hidden="true" focusable="false">
<use xlink:href="{{iconURL}}"></use>
</svg>
<span class="c-details__title">{{title}}</span>
</div>
</span>
</summary>
<div class="c-details__content">
{{{content}}}
Expand Down
Loading