universalviewer icon indicating copy to clipboard operation
universalviewer copied to clipboard

Hardcoded expand label in CenterPanel

Open Geoffsc opened this issue 1 year ago • 1 comments

There's a label on the CenterPanel that's hardcoded to "expand":

this.$subtitle = $(`<div class="subtitle">
                                <div class="wrapper">
                                    <button type="button" class="expand-btn" aria-label="Expand">
                                        <span aria-hidden="true">+</span>
                                    </button>
                                    <span class="text"></span>
                                </div>
                            </div>`);

The community sprint contributors discussed this on a call but we weren't sure how to reproduce the issue. We noticed that lower in CenterPanel.ts there's an option to enable a Subtitle which is set to false. It seems like we could potentially test this if this was set to true and the particular manifest has a subtitle, but it's possible there's more needed.

if (Bools.getBool(this.options.subtitleEnabled, false)) {
      this.$subtitle.show();
    } else {
      this.$subtitle.hide();
    }

Geoffsc avatar Oct 16 '24 16:10 Geoffsc

A couple of other potentially relevant details:

1.) While the subtitle-related config settings are enabled across all extensions, it looks like the subtitle property is only populated in the AV module... so finding a realistic test case for this may require digging into the AV-specific code.

2.) There is no existing translation for "Expand" by itself. We should determine whether we need to establish new translations, or if the existing "Expand content" translation might be appropriate for this context.

demiankatz avatar Oct 16 '24 16:10 demiankatz