Skip to content

Commit

Permalink
removing alt-text generation for decorative images (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
qiyundai authored Aug 29, 2024
1 parent 6a7bac7 commit ec87ce4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ function updateImgUploadComponentConfigs(component) {

const configs = {
type,
altText: `Event ${component.classList[1]} image`,
targetUrl: `/v1/events/${getFilteredCachedResponse().eventId}/images`,
};

Expand Down Expand Up @@ -107,7 +106,7 @@ export default async function init(component, props) {

dialog.innerHTML = '';

createTag('h1', { slot: 'heading' }, `You are deleting the ${configs.altText.toLowerCase()}.`, { parent: dialog });
createTag('h1', { slot: 'heading' }, 'You are deleting this image.', { parent: dialog });
createTag('p', {}, 'Are you sure you want to do this? This cannot be undone.', { parent: dialog });
const buttonContainer = createTag('div', { class: 'button-container' }, '', { parent: dialog });
const dialogDeleteBtn = createTag('sp-button', { variant: 'secondary', slot: 'button' }, 'Yes, I want to delete this image', { parent: buttonContainer });
Expand Down
2 changes: 1 addition & 1 deletion ecc/components/partner-selector/partner-selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export default class PartnerSelector extends LitElement {
const sponsorData = await uploadImage(file, {
targetUrl: `/v1/series/${this.seriesId}/sponsors/${this.partner.sponsorId}/images`,
type: 'sponsor-image',
altText: `${this.partner.name} image`,
altText: `${this.partner.name}`,
}, null, respJson.image?.imageId);

if (sponsorData) {
Expand Down
1 change: 0 additions & 1 deletion ecc/components/profile/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ export class Profile extends LitElement {
{
targetUrl: `/v1/series/${this.seriesId}/speakers/${profile.speakerId}/images`,
type: 'speaker-photo',
altText: `${this.profile.firstName} ${this.profile.lastName} photo`,
},
null,
lastPhoto?.imageId,
Expand Down

0 comments on commit ec87ce4

Please sign in to comment.