Skip to content
Merged
Show file tree
Hide file tree
Changes from 14 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
6 changes: 3 additions & 3 deletions assets/css/admin.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#adminmenu .toplevel_page_accessibility-settings .wp-menu-image img {
width: 18px;
height: 18px;
padding: 8px 0 0 3px;
width: 17px;
height: 17px;
padding: 8px 0 0 0;

opacity: 1;
filter: none;
Expand Down
6 changes: 6 additions & 0 deletions assets/images/menu-icon-wp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions modules/legacy/components/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public function maybe_add_introduction_modal() {
></iframe>
</div>
<h2 class="intro-title"><?php esc_html_e( 'Switch to our new accessibility widget', 'pojo-accessibility' ); ?></h2>
<p class="intro-description typography-body1"><?php esc_html_e( 'Web Accessibility by Elementor is our new and improved accessibility plugin. Get advanced customization, control, and customer support with one simple switch.', 'pojo-accessibility' ); ?></p>
<p class="intro-description typography-body1"><?php esc_html_e( 'Ally - Web Accessibility by Elementor is our new and improved accessibility plugin. Get advanced customization, control, and customer support with one simple switch.', 'pojo-accessibility' ); ?></p>
<div>
<ul class="benefits typography-body1">
<li>
Expand All @@ -191,7 +191,7 @@ public function maybe_add_introduction_modal() {
<a class="intro-learn-more no-underline typography-body1" href="<?php echo esc_url( self::get_learn_more_link( 'acc-popup-switch-oc' ) ); ?>"><?php esc_html_e( 'Learn more about the changes', 'pojo-accessibility' ); ?></a>
<div class="footer-actions">
<a href="#" class="close-button no-underline"><?php esc_html_e( 'Not now', 'pojo-accessibility' ); ?></a>
<a href="<?php echo esc_url( self::get_switch_now_link() ); ?>" class="button button-primary switch-now"><?php esc_html_e( 'Switch to Web Accessibility', 'pojo-accessibility' ); ?></a>
<a href="<?php echo esc_url( self::get_switch_now_link() ); ?>" class="button button-primary switch-now"><?php esc_html_e( 'Switch to Ally', 'pojo-accessibility' ); ?></a>
</div>
</div>
</div>
Expand Down Expand Up @@ -366,8 +366,8 @@ public function maybe_add_confirmation_modal() {
</svg>
</div>
</div>
<h2 class="confirmation-title"><?php esc_html_e( 'Confirm switching to Web Accessibility', 'pojo-accessibility' ); ?></h2>
<p class="confirmation-description"><?php esc_html_e( 'You’re about to switch from One click accessibility, which we no longer support, to Web Accessibility by Elementor. Any previous settings will be removed, and this action cannot be undone.', 'pojo-accessibility' ); ?></p>
<h2 class="confirmation-title"><?php esc_html_e( 'Confirm switching to Ally - Web Accessibility', 'pojo-accessibility' ); ?></h2>
<p class="confirmation-description"><?php esc_html_e( 'You’re about to switch from One click accessibility, which we no longer support, to Ally - Web Accessibility by Elementor. Any previous settings will be removed, and this action cannot be undone.', 'pojo-accessibility' ); ?></p>
<div class="footer-actions">
<a href="#" class="close-button no-underline"><?php esc_html_e( 'Keep Current', 'pojo-accessibility' ); ?></a>
<a href="<?php echo esc_url( self::get_switch_now_link() ); ?>" class="button button-primary upgrade-now"><?php esc_html_e( 'Confirm and switch', 'pojo-accessibility' ); ?></a>
Expand Down Expand Up @@ -568,7 +568,7 @@ public function maybe_render_pointer() {
wp_enqueue_style( 'wp-pointer' );

$pointer_content = '<h3>' . esc_html__( 'Accessibility', 'pojo-accessibility' ) . '</h3>';
$pointer_content .= '<p>' . esc_html__( 'Our new, improved accessibility plugin is now available! Web Accessibility is packed with advanced styling options, improved feature controls, and so much more.', 'pojo-accessibility' ) . '</p>';
$pointer_content .= '<p>' . esc_html__( 'Our new, improved accessibility plugin is now available! Ally - Web Accessibility by Elementor is packed with advanced styling options, improved feature controls, and so much more.', 'pojo-accessibility' ) . '</p>';

$pointer_content .= sprintf(
'<p><a class="button button-primary ea11y-pointer-settings-link" href="%s">%s</a></p>',
Expand Down
4 changes: 2 additions & 2 deletions modules/legacy/notices/dismissible-deprecated-nag.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ public function maybe_add_nag_deprecation_notice() {

public function content(): string {
return sprintf( '<p>%s <a href="%s">%s</a></p><p><a class="button button-primary" href="%s">%s</a></p>',
esc_html__( 'Time to take your site’s accessibility to the next level with Web Accessibility, our newest plugin packed with advanced widget customization, flexible feature controls, and a built-in statement generator. Want more details before switching?', 'pojo-accessibility' ),
esc_html__( 'Time to take your site’s accessibility to the next level with Ally - Web Accessibility by Elementor, our newest plugin packed with advanced widget customization, flexible feature controls, and a built-in statement generator. Want more details before switching?', 'pojo-accessibility' ),
esc_attr( Upgrade::get_learn_more_link( 'acc-notice-switch-dash' ) ),
esc_html__( 'Learn more', 'pojo-accessibility' ),
esc_attr( Upgrade::get_switch_now_link() ),
esc_html__( 'Switch To Web Accessibility', 'pojo-accessibility' )
esc_html__( 'Switch To Ally - Web Accessibility by Elementor', 'pojo-accessibility' )
);
}

Expand Down
4 changes: 2 additions & 2 deletions modules/legacy/notices/sticky-deprecated-nag.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ class Sticky_Deprecated_Nag extends Notice_Base {
public function content(): string {
return sprintf( '<h4>%s</h4><p>%s<a href="%s">%s</a></p><p><a class="button button-primary" href="%s">%s</a></p>',
__( 'New accessibility plugin available!', 'pojo-accessibility' ),
__( 'Your current plugin is no longer supported. Switch to Web Accessibility by Elementor now to access more customization, control, and tools for a more inclusive site.', 'pojo-accessibility' ),
__( 'Your current plugin is no longer supported. Switch to Ally - Web Accessibility by Elementor now to access more customization, control, and tools for a more inclusive site.', 'pojo-accessibility' ),
Upgrade::get_learn_more_link( 'acc-notice-switch-oc' ), // link to learn more
__( 'Learn More', 'pojo-accessibility' ),
Upgrade::get_switch_now_link(), // link to switch now
__( 'Switch Web Accessibility', 'pojo-accessibility' )
__( 'Switch Ally - Web Accessibility by Elementor', 'pojo-accessibility' )
);
}

Expand Down
8 changes: 4 additions & 4 deletions modules/settings/assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ const App = () => {
});
}, []);

const selectedParent = MenuItems[selectedMenu.parent];
const selectedChild = selectedMenu.child
? selectedParent.children[selectedMenu.child]
const selectedParent = MenuItems[selectedMenu?.parent];
const selectedChild = selectedMenu?.child
? selectedParent?.children[selectedMenu?.child]
: null;

return (
Expand All @@ -69,7 +69,7 @@ const App = () => {
<PageContent
// Looks the best if we have both checks
isLoading={!hasFinishedResolution || loading}
page={selectedChild ? selectedChild.page : selectedParent?.page}
page={selectedChild ? selectedChild?.page : selectedParent?.page}
/>
</StyledContainer>
</StyledGrid>
Expand Down
4 changes: 2 additions & 2 deletions modules/settings/assets/js/components/connect-modal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const StyledGrid = styled(Grid)`

width: 600px;
max-width: 95%;
height: 552px;
height: 570px;
gap: 0;
background-color: ${({ theme }) => theme.palette.background.paper};
padding: ${({ theme }) => theme.spacing(5)};
Expand Down Expand Up @@ -65,7 +65,7 @@ const ConnectModal = () => {

<Typography variant="body2" color="text.primary" width={400}>
{__(
'Make your site more inclusive with Web accessibility.',
'Make your site more inclusive with Ally - Web Accessibility by Elementor.',
'pojo-accessibility',
)}
</Typography>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const PostConnectModal = () => {
marginBottom={5}
>
{__(
'Web accessibility is now connected and ready to use on your site.',
'Ally - Web Accessibility by Elementor is now connected and ready to use on your site.',
'pojo-accessibility',
)}
</Typography>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ const StyledHeading = styled(Box)`
display: flex;
align-items: center;
justify-content: center;
padding: ${({ theme }) => theme.spacing(0.5)};
padding-top: 0;
padding: 0;
`;

const SidebarAppBar = () => {
Expand All @@ -24,17 +23,16 @@ const SidebarAppBar = () => {
<Toolbar
disableGutters
variant="dense"
sx={{ justifyContent: 'flex-start' }}
sx={{ justifyContent: 'space-between' }}
>
<StyledHeading>
<ElementorLogo />

<Typography
variant="h6"
marginLeft={0.5}
display={!openSidebar ? 'none' : 'inherit'}
>
{__('Web accessibility', 'pojo-accessibility')}
{__('Ally', 'pojo-accessibility')}
</Typography>
</StyledHeading>

Expand Down
29 changes: 12 additions & 17 deletions modules/settings/assets/js/components/sidebar-menu/menu.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,21 @@
import { PagesIcon } from '@elementor/icons';
import { PagesIcon, SettingsIcon } from '@elementor/icons';
import { WidgetIcon } from '@ea11y/icons';
import { AccessibilityStatement, Menu, IconSettings } from '@ea11y/pages';
import { __ } from '@wordpress/i18n';
import AccessibilityStatementTooltip from './tooltips/accessibility-statement';

export const MenuItems = {
widget: {
name: __('Widget', 'pojo-accessibility'),
key: 'widget',
icon: <WidgetIcon size="small" />,
children: {
iconSettings: {
name: __('Button', 'pojo-accessibility'),
key: 'icon-settings',
page: <IconSettings />,
},
menu: {
name: __('Capabilities', 'pojo-accessibility'),
key: 'menu',
page: <Menu />,
},
},
design: {
name: __('Design', 'pojo-accessibility'),
key: 'design',
page: <IconSettings />,
icon: <WidgetIcon />,
},
capabilities: {
name: __('Capabilities', 'pojo-accessibility'),
key: 'capabilities',
page: <Menu />,
icon: <SettingsIcon size="small" sx={{ color: 'common.black' }} />,
},
accessibilityStatement: {
name: __('Statement', 'pojo-accessibility'),
Expand Down
2 changes: 1 addition & 1 deletion modules/settings/assets/js/constants/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const HELP_LINK = 'https://go.elementor.com/';
export const HELP_LINK = 'https://go.elementor.com/acc-main-help/';
export const UPGRADE_LINK = 'https://go.elementor.com/';
export const LEARN_MORE_LINK =
'https://go.elementor.com/acc-statement-learn-more/';
Expand Down
3 changes: 1 addition & 2 deletions modules/settings/assets/js/hooks/use-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ export function useSettings() {
export const SettingsProvider = ({ children }) => {
const [openSidebar, setOpenSidebar] = useState(true);
const [selectedMenu, setSelectedMenu] = useState({
parent: 'widget',
child: 'iconSettings',
parent: 'design',
});

const [widgetMenuSettings, setWidgetMenuSettings] = useState({
Expand Down
2 changes: 1 addition & 1 deletion modules/settings/assets/js/icons/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const WidgetIcon = ({ size }) => {
<path
id="Vector"
d="M2.5 10C2.5 10.9849 2.69399 11.9602 3.0709 12.8701C3.44781 13.7801 4.00026 14.6069 4.6967 15.3033C5.39314 15.9997 6.21993 16.5522 7.12987 16.9291C8.03982 17.306 9.01509 17.5 10 17.5C10.9849 17.5 11.9602 17.306 12.8701 16.9291C13.7801 16.5522 14.6069 15.9997 15.3033 15.3033C15.9997 14.6069 16.5522 13.7801 16.9291 12.8701C17.306 11.9602 17.5 10.9849 17.5 10C17.5 9.01509 17.306 8.03982 16.9291 7.12987C16.5522 6.21993 15.9997 5.39314 15.3033 4.6967C14.6069 4.00026 13.7801 3.44781 12.8701 3.0709C11.9602 2.69399 10.9849 2.5 10 2.5C9.01509 2.5 8.03982 2.69399 7.12987 3.0709C6.21993 3.44781 5.39314 4.00026 4.6967 4.6967C4.00026 5.39314 3.44781 6.21993 3.0709 7.12987C2.69399 8.03982 2.5 9.01509 2.5 10Z"
fill="white"
fill="transparent"
stroke="black"
strokeWidth="1.5"
strokeLinecap="round"
Expand Down
2 changes: 1 addition & 1 deletion modules/settings/components/settings-pointer.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function admin_print_script() {
wp_enqueue_style( 'wp-pointer' );
wp_enqueue_script( 'wp-util' );

$pointer_content = '<h3>' . esc_html__( 'Web accessibility', 'pojo-accessibility' ) . '</h3>';
$pointer_content = '<h3>' . esc_html__( 'Ally - Web Accessibility by Elementor', 'pojo-accessibility' ) . '</h3>';
$pointer_content .= '<p>' . esc_html__( "Start setting up and customizing your site's accessibility widget.", 'pojo-accessibility' ) . '</p>';

$pointer_content .= sprintf(
Expand Down
7 changes: 3 additions & 4 deletions modules/settings/module.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

namespace EA11y\Modules\Settings;

use EA11y\Classes\{
Expand Down Expand Up @@ -50,12 +49,12 @@ public function render_app() {

public function register_page() : void {
add_menu_page(
__( 'Web Accessibility', 'pojo-accessibility' ),
__( 'Web Accessibility', 'pojo-accessibility' ),
__( 'Ally - Web Accessibility by Elementor', 'pojo-accessibility' ),
__( 'Ally', 'pojo-accessibility' ),
self::SETTING_CAPABILITY,
self::SETTING_BASE_SLUG,
[ $this, 'render_app' ],
EA11Y_ASSETS_URL . 'images/menu-icon.svg',
EA11Y_ASSETS_URL . 'images/menu-icon-wp.svg',
);

add_submenu_page(
Expand Down
2 changes: 1 addition & 1 deletion pojo-accessibility.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
Plugin Name: Web Accessibility - Implement Accessibility Features: Widget and Statement Generator
Plugin Name: Ally - Web Accessibility - Implement Accessibility Features: Widget and Statement Generator
Plugin URI: https://elementor.com/
Description: Improve your website’s accessibility with ease. Customize capabilities such as text resizing, contrast modes, link highlights, and easily generate an accessibility statement to demonstrate your commitment to inclusivity.
Author: Elementor.com
Expand Down
Loading