Upload
takayuki-miyoshi
View
1.024
Download
4
Embed Size (px)
Citation preview
What is the Responsibility
of Plugin Developers?
Takayuki Miyoshi
https://profiles.wordpress.org/takayukister/
I am Takayuki Miyoshi, WordPress plugin developer.
I have been involved in the WordPress community in a lot of roles.
Translation Contributor
Support Team Support Contributor
Core Contributor
WordPress.tv Contributor
WordCamp Speaker
Community Team
Translation Editor
Plugin Developer
I'm from Fukuoka, Japan
I'm from Fukuoka, Japan
Me, too!
The original Wapuu was created by a Fukuoka-based illustrator
and introduced at WordCamp Fukuoka 2011.
https://wapuu.jp/
https://wapuu.jp/
Wapuutopia
Fukuoka
=
I have 10 years experience in plugin development. Contact Form 7 and Bogo are my most favorite plugins.
Contact Form 7 manages contact forms.
Bogo makes your sites multilingual.
https://wptavern.com/contact-form-7-passes-40-million-downloads
Last month Contact Form 7 passed 40,000,000 downloads. WP Tavern wrote an article about it.
What is the Responsibility
of Plugin Developers?
WordPress allows plugins to do everything.
Plugins can make WordPress better
or worse.
WordPress gives us great opportunities.
What should we do for WordPress?
What is the Responsibility
of Plugin Developers?
The Responsibility of Plugin Developers Is to Keep WordPress
Accessible for Everyone.
WordPress Core is Designed to Be
Accessible for Everyone.
Plugins Should Follow It.
Let's Look at Two Aspects.
Accessibility Localization
&
Is Your Plugin Accessible?
Can you read this?
Ensure Enough Contrast.
Low-contrast text is hard to read.
<form action="http://example.c
om/donut" method="post">
<p> <input type="
radio" name="flavor" id="choc"
value="chocolate" />
<label for="choc">Chocolat
e</label><br/>
<input type="radio" name="fl
avor" id="cream" value="cream"
/>
<label for="cream">Cream F
illed</label><br/>
<input type="radio" name="fl
avor" id="honey" value="honey"
/>
<label for="honey">Honey G
lazed</label><br/>
<input type="submit" value="
Purchase Donuts"/>
</p> </form> Label Correctly.
<form action="http://example.c
om/donut" method="post">
<p> <input type="
radio" name="flavor" id="choc"
value="chocolate" />
<label for="choc">Chocolat
e</label><br/>
<input type="radio" name="fl
avor" id="cream" value="cream"
/>
<label for="cream">Cream F
illed</label><br/>
<input type="radio" name="fl
avor" id="honey" value="honey"
/>
<label for="honey">Honey G
lazed</label><br/>
<input type="submit" value="
Purchase Donuts"/>
</p> </form>
If your form isn't correctly labeled, screen reader users have no idea what to input into the fields.
https://make.wordpress.org/accessibility/2016/03/21/wordpress-goes-wcag/
The WordPress Accessibility Team announced that all new or updated code released into WordPress core must conform with the WCAG 2.0 guidelines.
WordPress core code ensures a specific level of accessibility.
Plugins should follow it.
WordPress Accessibility Handbook provides essential information for plugin developers.
Is Your Plugin Multilingual-Ready?
Translation
https://translate.wordpress.org/projects/wp-plugins/contact-form-7/stable/ja/default
translate.wordpress.org makes collaborative translation possible.
__( "You are not allowed to
upload files of this type.",
'contact-form-7' )
Make Text Translatable with __() Function.
__( $text, $domain ) _e( $text, $domain ) _x( $text, $context, $domain ) _ex( $text, $context, $domain ) _n( $single, $plural, $number, $domain ) _nx( $single, $plural, $number, $context, $domain )
You can also use variant functions.
Text Direction
In some languages, text is written Right-to-Left.
Add New Post page in English
Add New Post page in Arabic
Add New Post page in Chinese
Add New Post page in Hebrew
Add New Post page in Japanese
Add New Post page in Persian
In some languages, text is written Right-to-Left (RTL)
and pages may have a different layout.
Do your plugins work correctly in RTL languages?
Many plugins add blocks into the admin screen.
If you set these properties in your plugin's stylesheet, you may need to change
the 'left' to 'right' in RTL languages:
• text-align: left • margin-left: • padding-left: • border-left: • left:
If you set these properties in your plugin's stylesheet, you may need to change
the 'left' to 'right' in RTL languages:
• text-align: right • margin-right: • padding-right: • border-right: • right:
WordPress function is_rtl() tells if the site language is RTL.
if ( is_rtl() ) { wp_enqueue_style( 'style-rtl',
'/css/style-rtl.css' ); }
Make an additional stylesheet for RTL and load it when the site language is RTL.
We looked at two aspects today
but of course these are not the only things we need to learn.
Accessibility Localization
&
These are not about cool programming techniques, but it doesn't mean it's not
important for developers.
ACTUALLY, IT’S REALLY IMPORTANT!
The Responsibility of Plugin Developers Is to Keep WordPress
Accessible for Everyone.
This is what I keep in mind when creating a plugin.