Description.js (1620B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 "use strict"; 5 6 // React & Redux 7 const { 8 createFactory, 9 } = require("resource://devtools/client/shared/vendor/react.mjs"); 10 const { 11 div, 12 p, 13 img, 14 } = require("resource://devtools/client/shared/vendor/react-dom-factories.js"); 15 const LearnMoreLink = createFactory( 16 require("resource://devtools/client/accessibility/components/LearnMoreLink.js") 17 ); 18 19 // Localization 20 const { 21 L10N, 22 } = require("resource://devtools/client/accessibility/utils/l10n.js"); 23 24 const { 25 A11Y_LEARN_MORE_LINK, 26 } = require("resource://devtools/client/accessibility/constants.js"); 27 28 /** 29 * Landing UI for the accessibility panel when Accessibility features are 30 * deactivated. 31 */ 32 function Description() { 33 return div( 34 { className: "description", role: "presentation", tabIndex: "-1" }, 35 div( 36 { className: "general", role: "presentation", tabIndex: "-1" }, 37 img({ 38 src: "chrome://devtools/skin/images/accessibility.svg", 39 alt: L10N.getStr("accessibility.logo"), 40 }), 41 div( 42 { role: "presentation", tabIndex: "-1" }, 43 LearnMoreLink({ 44 href: A11Y_LEARN_MORE_LINK, 45 learnMoreStringKey: "accessibility.learnMore", 46 l10n: L10N, 47 messageStringKey: "accessibility.description.general.p1", 48 }), 49 p({}, L10N.getStr("accessibility.enable.disabledTitle")) 50 ) 51 ) 52 ); 53 } 54 55 // Exports from this module 56 exports.Description = Description;