Skip to content

Instantly share code, notes, and snippets.

View takahirohonda's full-sized avatar

Takahiro Honda takahirohonda

View GitHub Profile
@takahirohonda
takahirohonda / accessibility-form-tips-3-radio-input.html
Created October 12, 2019 04:31
accessibility-form-tips-3-radio-input.html
<fieldset class="input-field" tabindex=0 >
<legend class="form-label">Venue Location</legend>
<p class="sr-only">Select the city you would like to attend.</p>
<div class="radio-button-container venueLocation-group"
role="radiogroup" aria-required="true">
<div class="radio-button-group" tabindex=0>
<input type="radio" class="radio-input" id="sydney"
name="venue" value="Sydney" required />
<label class="radio-label" for="sydney">
Sydney
@takahirohonda
takahirohonda / accessibility-form-tips-3-radio-input.html
Created October 12, 2019 04:31
accessibility-form-tips-3-radio-input.html
<fieldset class="input-field" tabindex=0 >
<legend class="form-label">Venue Location</legend>
<p class="sr-only">Select the city you would like to attend.</p>
<div class="radio-button-container venueLocation-group"
role="radiogroup" aria-required="true">
<div class="radio-button-group" tabindex=0>
<input type="radio" class="radio-input" id="sydney"
name="venue" value="Sydney" required />
<label class="radio-label" for="sydney">
Sydney
@takahirohonda
takahirohonda / accessibility-form-tips-2.html
Created October 12, 2019 04:17
accessibility-form-tips-2.html
<input
type="text"
class="form-input"
id="firstname"
name="firstname"
required
aria-required="true"
placeholder="Enter your first name"
/>
@takahirohonda
takahirohonda / accessibility-form-tips-1.html
Created October 12, 2019 04:14
accessibility-form-tips-1.html
<p class="sr-only">To attend the event, please continue to register.</p>
<style>
.sr-only {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
@takahirohonda
takahirohonda / di-lifetime-management-sitecore.web.config
Created September 26, 2019 13:31
di-lifetime-management-sitecore.web.config
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<remove name="WebDAVModule" />
<add type="Sitecore.DependencyInjection.SitecorePerRequestScopeModule,
Sitecore.Kernel" name="SitecorePerRequestScopeModule" />
....
@takahirohonda
takahirohonda / sitecore-di-example-blog-3.cs
Created September 25, 2019 13:25
sitecore-di-example-blog-3.cs
public class FrontEndTestController : Controller
{
private IFrontEndTestRepository frontEndTestRepository;
public FrontEndTestController(IFrontEndTestRepository frontEndTestRepository)
{
this.frontEndTestRepository = frontEndTestRepository;
}
public ViewResult GetFrontEndTestView()
{
@takahirohonda
takahirohonda / sitecore-di-example-blog-2-Feature.Design.config
Created September 25, 2019 13:23
sitecore-di-example-blog-2-Feature.Design.config
<?xml version="1.0"?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<services>
<configurator type="SitecoreDev.Feature.Design.RegisterDependencies,
SitecoreDev.Feature.Design"/>
</services>
</sitecore>
</configuration>
@takahirohonda
takahirohonda / sitecore-di-example-blog-2-RegisterDependencies.cs
Created September 25, 2019 13:21
sitecore-di-example-blog-2-RegisterDependencies.cs
using SitecoreDev.Feature.Design.Repository;
namespace SitecoreDev.Feature.Design
{
using Microsoft.Extensions.DependencyInjection;
using Sitecore.DependencyInjection;
using SitecoreDev.Feature.Design.Controllers;
public class RegisterDependencies : IServicesConfigurator
{
@takahirohonda
takahirohonda / sitecore-di-example-blog-1.cs
Created September 25, 2019 13:11
sitecore-di-example-blog-1.cs
public class FrontEndTestController : Controller
{
private IFrontEndTestRepository frontEndTestRepository;
// Poor man's DI. We want to get rid of this.
public FrontEndTestController() : this(new FrontEndTestRepository())
public FrontEndTestController(IFrontEndTestRepository frontEndTestRepository)
{
this.frontEndTestRepository = frontEndTestRepository;
@takahirohonda
takahirohonda / my-twa-config-res-values-style.xml
Created September 15, 2019 01:17
my-twa-config-res-values-style.xml
<resources>
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowActionBar">false</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowFullscreen">true</item>
</style>
<style name="Theme.LauncherActivity" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="android:windowAnimationStyle">@null</item>
<item name="android:windowIsTranslucent">false</item>
<item name="android:windowNoTitle">true</item>