diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 6915b48d6..37894d189 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -134,88 +134,94 @@ export class Header extends React.Component { const logoOnly = this.props.logoOnly ?? false; return ( - - - {title()} +
+

{title("")}

+ + + {title()} + {!logoOnly && ( + <> + {this.props.libraries && this.props.libraries.length > 0 && ( + + {(!this.context.library || !currentLibrary) && ( + + )} + {this.props.libraries.map((library) => ( + + ))} + + )} + + + )} + + {!logoOnly && ( - <> - {this.props.libraries && this.props.libraries.length > 0 && ( - - {(!this.context.library || !currentLibrary) && ( - + + {currentLibrary && ( + )} - - - )} - - - {!logoOnly && ( - - {currentLibrary && ( -
); } diff --git a/src/components/__tests__/Header-test.tsx b/src/components/__tests__/Header-test.tsx index 26d60f80d..c6ae4aabd 100644 --- a/src/components/__tests__/Header-test.tsx +++ b/src/components/__tests__/Header-test.tsx @@ -42,6 +42,11 @@ describe("Header", () => { }); describe("rendering", () => { + it("renders h1 heading", () => { + const heading = wrapper.find("h1"); + expect(heading.text()).to.equal(title()); + }); + it("shows the brand name", () => { expect(wrapper.containsMatchingElement({title()})).to.equal( true diff --git a/src/index.tsx b/src/index.tsx index 4b67d2dee..ff54c211c 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -27,6 +27,7 @@ class CirculationAdmin { div.id = "opds-catalog"; div.className = "palace"; document.getElementsByTagName("body")[0].appendChild(div); + document.documentElement.lang = "en"; const catalogEditorPath = "/admin/web(/collection/:collectionUrl)(/book/:bookUrl)(/tab/:tab)";