Skip to content
Open
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: 2 additions & 1 deletion static/scenes/modvil/elements/modvil-tracker-photo.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class ModvilTrackerPhotoElement extends LitElement {
_href: {type: String},
_author: {type: String},
brand: {type: Boolean},
disabled: {type: Boolean},
};
}

Expand All @@ -59,7 +60,7 @@ class ModvilTrackerPhotoElement extends LitElement {
<div class="inner">
<slot></slot>
<div class="attribution ${this.brand ? 'brand' : ''}">
<a target="_blank" href=${ifDefined(this._href)}>${this._author}</a>
<a aria-hidden="${this.disabled ? 'true' : 'false'}" tabindex="${this.disabled ? '-1' : '0'}" target="_blank" href=${ifDefined(this._href)}>${this._author}</a>
</div>
</div>
`;
Expand Down
4 changes: 3 additions & 1 deletion static/scenes/modvil/elements/modvil-tracker-photos.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ class ModvilTrackerStatsElement extends LitElement {
this._photoNode.append(node);
node.offsetLeft; // and forcing layout, important
node.style.transform = null;
node.disabled = !this.open;
});

// Extra control.
Expand Down Expand Up @@ -248,6 +249,7 @@ class ModvilTrackerStatsElement extends LitElement {

node.toggleAttribute('large', !!this.open);
node.setAttribute('appear', '');
node.disabled = !this.open;
this._photoNode.prepend(node);
await node.updateComplete;
await new Promise((resolve) => {
Expand Down Expand Up @@ -277,7 +279,7 @@ class ModvilTrackerStatsElement extends LitElement {
<h1>${d.city}</h1>
<h2>${d.region}</h2>
</div>
<button class="hint button-open" @click=${() => this.open = true}></button>
<button aria-label="${d.city}, ${d.region}, Local Guide images" class="hint button-open" @click=${() => this.open = true}></button>
</div>
<div class="view-open">
<button class="hint button-close" @click=${() => this.open = false}></button>
Expand Down